filesystem

package
v0.0.1-20220602-0002 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func (*File) Delete

func (f *File) Delete() error

func (*File) Info

func (f *File) Info() driver.FileInfoInterface

func (*File) Location

func (f *File) Location() driver.LocationInterface

func (*File) Read

func (f *File) Read() ([]byte, error)

type FileInfo

type FileInfo struct {
	// contains filtered or unexported fields
}

func DriverFileInfoToNative

func DriverFileInfoToNative(fileInfo driver.FileInfo) FileInfo

func NewFileInfo

func NewFileInfo(physicalFilePath, relativeFilePath string) (*FileInfo, error)

func (*FileInfo) ContentType

func (f *FileInfo) ContentType() string

func (*FileInfo) CreatedAt

func (f *FileInfo) CreatedAt() time.Time

func (*FileInfo) DirPath

func (f *FileInfo) DirPath() string

func (*FileInfo) Extension

func (f *FileInfo) Extension() string

func (*FileInfo) FullName

func (f *FileInfo) FullName() string

func (*FileInfo) ID

func (f *FileInfo) ID() *uuid.UUID

func (*FileInfo) Mode

func (f *FileInfo) Mode() os.FileMode

func (*FileInfo) Name

func (f *FileInfo) Name() string

func (*FileInfo) Path

func (f *FileInfo) Path() string

func (*FileInfo) Size

func (f *FileInfo) Size() int64

func (*FileInfo) Sys

func (f *FileInfo) Sys() driver.Any

func (*FileInfo) ToStruct

func (f *FileInfo) ToStruct() driver.FileInfo

func (*FileInfo) UpdatedAt

func (f *FileInfo) UpdatedAt() time.Time

type Location

type Location struct {
	DirPath string
}

func (*Location) CopyFile

func (*Location) DeleteFile

func (l *Location) DeleteFile(
	file driver.FileInterface,
) error

func (*Location) FileExists

func (l *Location) FileExists(filePath string) (bool, error)

func (*Location) FileFromInfo

func (l *Location) FileFromInfo(fileInfo driver.FileInfo) (driver.FileInterface, error)

FileFromInfo -> it recreates the file struct/object from driver.FileInfo so further manipulations can be made

func (*Location) FileFromInfoJson

func (l *Location) FileFromInfoJson(fileInfo string) (driver.FileInterface, error)

TODO: FileFromInfoMap -> it recreates the file struct/object from driver.FileInfo so further manipulations can be made

func (*Location) FileFromInfoMap

func (l *Location) FileFromInfoMap(fileInfo map[string]interface{}) (driver.FileInterface, error)

TODO: FileFromInfoMap -> it recreates the file struct/object from driver.FileInfo so further manipulations can be made

func (*Location) FindFile

func (l *Location) FindFile(filePath string) (driver.FileInterface, error)

func (*Location) GetFilePath

func (l *Location) GetFilePath(filePath string) string

func (*Location) MoveFile

func (*Location) Open

func (l *Location) Open() (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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