Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileCopyStatus ¶
type FileDestination ¶
type FileDestination struct { Path string FileMode os.FileMode // if you want to receive in real time the status (how much left to copy) // put a callback handler over here OnCopy FileOnCopy }
FileDestination -> is used when copying or moving to a new destination
type FileInfoInterface ¶
type FileInfoInterface interface { // ToStruct -> Converts to a struct ToStruct() FileInfo // ID - is available only when saving to a storage which supports File Identification ID() *uuid.UUID // Name() string FullName() string // Path() string DirPath() string ContentType() string Size() int64 Extension() string Mode() os.FileMode // UpdatedAt() time.Time CreatedAt() time.Time // Sys - other system info for this file Sys() Any }
type FileInterface ¶
type FileInterface interface { // Read() ([]byte, error) Info() FileInfoInterface // TODO: we can return all the functions from the current file over there // Get location of the file Location() LocationInterface }
type FileOnCopy ¶
type FileOnCopy func(status FileCopyStatus)
type LocationInterface ¶
type LocationInterface interface { // Open the location Open() (bool, error) CopyFile(file FileInterface, dest FileDestination) (FileInterface, error) MoveFile(file FileInterface, dest FileDestination) (FileInterface, error) // DeleteFile - File status will be used for deletion DeleteFile(file FileInterface) error }
Click to show internal directories.
Click to hide internal directories.