file

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistPath

func ExistPath(name string) bool

func ExtencionFile

func ExtencionFile(filename string) string

func MakeFile

func MakeFile(folder, name, model string, args ...any) (string, error)

func MakeFolder

func MakeFolder(names ...string) (string, error)

func RemoveFile

func RemoveFile(path string) (bool, error)

func WatcherPath

func WatcherPath(path string)

Types

type SyncFile

type SyncFile struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	Id        string
	Name      string
	Path      string
	Data      []byte
	// contains filtered or unexported fields
}

func NewSyncFile

func NewSyncFile(name string, def any) (*SyncFile, error)

func (*SyncFile) Delete

func (s *SyncFile) Delete() error

* * Delete * @return error *

func (*SyncFile) Empty

func (s *SyncFile) Empty() error

* * Empty * @return error *

func (*SyncFile) Get

func (s *SyncFile) Get() ([]byte, error)

* * Get * @return []byte, error *

func (*SyncFile) Save

func (s *SyncFile) Save() error

* * Save * @return error *

func (*SyncFile) Set

func (s *SyncFile) Set(data []byte) error

* * Set * @param data []byte * @return error *

func (*SyncFile) Unmarshal

func (s *SyncFile) Unmarshal(v any) error

* * Unmarshal * @param v any * @return error *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL