FileSystem

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: OSL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EXTENSION_SEPARATOR = "."
View Source
var PATH_SEPARATOR = "/"

Functions

This section is empty.

Types

type DirectoryInfo

type DirectoryInfo struct {
	Path string
	// contains filtered or unexported fields
}

func DirectoryInfo_New

func DirectoryInfo_New(path string) *DirectoryInfo

func (*DirectoryInfo) Create

func (this *DirectoryInfo) Create() error

func (*DirectoryInfo) CreateSubdirectory

func (this *DirectoryInfo) CreateSubdirectory(path string) (DirectoryInfo, error)

func (*DirectoryInfo) Delete

func (this *DirectoryInfo) Delete() error

func (*DirectoryInfo) GetAbsPath

func (this *DirectoryInfo) GetAbsPath() (string, error)

func (*DirectoryInfo) GetAllFiles

func (this *DirectoryInfo) GetAllFiles() (Collections.List[string], error)

func (*DirectoryInfo) GetDirectories

func (this *DirectoryInfo) GetDirectories() (Collections.List[DirectoryInfo], error)

func (*DirectoryInfo) GetFiles

func (this *DirectoryInfo) GetFiles() (Collections.List[FileInfo], error)

func (*DirectoryInfo) GetParent

func (this *DirectoryInfo) GetParent() DirectoryInfo

type DirectoryObj

type DirectoryObj struct{}
var Directory DirectoryObj

func (*DirectoryObj) Create

func (this *DirectoryObj) Create(path string) error

func (*DirectoryObj) CreateSubdirectiry

func (this *DirectoryObj) CreateSubdirectiry(path string) error

func (*DirectoryObj) Delete

func (this *DirectoryObj) Delete(path string) error

func (*DirectoryObj) DeleteAll

func (this *DirectoryObj) DeleteAll(path string) error

func (*DirectoryObj) GetDirectories

func (this *DirectoryObj) GetDirectories(path string) (Collections.List[string], error)

func (*DirectoryObj) GetFiles

func (this *DirectoryObj) GetFiles(path string) (Collections.List[string], error)

type FileInfo

type FileInfo struct {
	Path string
}

func FileInfo_New

func FileInfo_New(path string) *FileInfo

func (*FileInfo) Create

func (this *FileInfo) Create() error

func (*FileInfo) Delete

func (this *FileInfo) Delete() error

func (*FileInfo) Directory

func (this *FileInfo) Directory() DirectoryInfo

func (*FileInfo) Exists

func (this *FileInfo) Exists() (bool, error)

func (*FileInfo) GetFileChecksum added in v1.1.7

func (this *FileInfo) GetFileChecksum(hash hash.Hash) (string, error)

func (*FileInfo) LoadJSON

func (this *FileInfo) LoadJSON() (interface{}, error)

func (*FileInfo) Name

func (this *FileInfo) Name() string

func (*FileInfo) ReadAllText

func (this *FileInfo) ReadAllText() (string, error)

func (*FileInfo) ReadBytes

func (this *FileInfo) ReadBytes() ([]byte, error)

func (*FileInfo) ReadFileLines

func (this *FileInfo) ReadFileLines() (Collections.List[string], error)

func (*FileInfo) WriteAllText

func (this *FileInfo) WriteAllText(text string) error

func (*FileInfo) WriteBytes

func (this *FileInfo) WriteBytes(data []byte) error

type PathObj

type PathObj struct {
}
var Path PathObj

func Path_New

func Path_New() *PathObj

func (*PathObj) Combine

func (this *PathObj) Combine(p1 ...string) string

func (*PathObj) Exists

func (this *PathObj) Exists(path string) (bool, error)

func (*PathObj) GetDirectoryParent

func (this *PathObj) GetDirectoryParent(path string) string

func (*PathObj) GetExtension

func (this *PathObj) GetExtension(path string) string

func (*PathObj) GetFileName

func (this *PathObj) GetFileName(path string) string

func (*PathObj) GetFullPath

func (this *PathObj) GetFullPath(path string) (string, error)

func (*PathObj) GetRelativePath

func (this *PathObj) GetRelativePath(relativeTo string, path string) (string, error)

func (*PathObj) IsDirectory

func (this *PathObj) IsDirectory(path string) (bool, error)

func (*PathObj) IsFile

func (this *PathObj) IsFile(path string) (bool, error)

func (*PathObj) TrimEndingDirectorySeparator

func (this *PathObj) TrimEndingDirectorySeparator(path string) string

Jump to

Keyboard shortcuts

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