file

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtencionFile

func ExtencionFile(filename string) string

* * ExtencionFile * @param filename string * @return string *

func MakeFile

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

* * MakeFile * @param folder, name, model string, args ...any * @return string, error *

func MakeFolder

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

* * MakeFolder * @param names ...string * @return string, error *

func ReadFile added in v0.1.4

func ReadFile(path string) (string, error)

* * ReadFile * @param path string * @return string, error *

func RemoveFile

func RemoveFile(path string) (bool, error)

* * RemoveFile * @param path string * @return bool, error *

func WatcherPath

func WatcherPath(path string)

Types

type FileInfo added in v0.1.4

type FileInfo struct {
	Path  string
	Info  os.FileInfo
	Error error
	IsDir bool
	Exist bool
}

func ExistPath

func ExistPath(path string) FileInfo

* * ExistPath * @param path string * @return bool *

func (*FileInfo) Json added in v0.1.4

func (s *FileInfo) Json() et.Json

type SyncFile

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

func NewSyncFile

func NewSyncFile(dataDirectory, name string, initialData any) (*SyncFile, error)

func (*SyncFile) Delete

func (s *SyncFile) Delete() error

* * Delete * @return error *

func (*SyncFile) Load added in v0.1.0

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

* * Load * @param v any * @return error *

func (*SyncFile) Save

func (s *SyncFile) Save() error

* * Save * @return error *

func (*SyncFile) Set

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

* * Set * @param data []byte, saved bool * @return error *

Jump to

Keyboard shortcuts

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