Documentation
¶
Index ¶
- Constants
- Variables
- func CopyFiles(srcFiles, dstFiles *array.AnyArray[*File])
- func CopyFilesBy2Path(srcPath, dstPath string)
- func CopyFilesByDstPath(srcFiles *array.AnyArray[*File], dstPath string)
- type CopyDirDstError
- type CopyDirError
- type CopyDirSrcError
- type CopyFileDstError
- type CopyFileError
- type CopyFileSrcError
- type CreateDirError
- type CreateFileError
- type Dir
- func (my *Dir) CheckPermission(mode os.FileMode) bool
- func (my *Dir) Copy() *Dir
- func (my *Dir) CopyAllDirsTo(dstDir string) *Dir
- func (my *Dir) CopyAllFilesTo(dstDir string) *Dir
- func (my *Dir) Create(mode os.FileMode) *Dir
- func (my *Dir) CreateDefaultMode() *Dir
- func (my *Dir) Error() error
- func (my *Dir) GetBasePath() string
- func (my *Dir) GetDirs() *array.AnyArray[*Dir]
- func (my *Dir) GetExist() bool
- func (my *Dir) GetFiles() *array.AnyArray[*File]
- func (my *Dir) GetFullPath() string
- func (my *Dir) GetInfo() os.FileInfo
- func (my *Dir) GetMode() os.FileMode
- func (my *Dir) GetName() string
- func (my *Dir) GetSize() int64
- func (my *Dir) Join(path string) *Dir
- func (my *Dir) Joins(paths ...string) *Dir
- func (my *Dir) Lock() *Dir
- func (my *Dir) Ls() *Dir
- func (*Dir) NewByAbs(path string) *Dir
- func (*Dir) NewByRel(path string) *Dir
- func (my *Dir) RLock() *Dir
- func (my *Dir) RUnlock() *Dir
- func (my *Dir) Remove() *Dir
- func (my *Dir) Rename(newName string) *Dir
- func (my *Dir) Unlock() *Dir
- func (*Dir) WhoAmI() FilesystemV2Type
- type DirCollection
- type DirFullPathEmptyError
- type DirInitError
- type DirNotExistsError
- type File
- func (my *File) CheckPermission(permissions ...int) *File
- func (my *File) Copy() *File
- func (my *File) CopyTo(dstFilename string) *File
- func (my *File) Create(mode os.FileMode, operations ...int) *File
- func (my *File) CreateDefaultMode(operations ...int) *File
- func (my *File) Error() error
- func (my *File) GetBasePath() string
- func (my *File) GetExist() bool
- func (my *File) GetExtension() string
- func (my *File) GetFullPath() string
- func (my *File) GetInfo() os.FileInfo
- func (my *File) GetMode() os.FileMode
- func (my *File) GetName() string
- func (my *File) GetSize() int64
- func (my *File) Lock() *File
- func (*File) NewByAbs(path string) *File
- func (*File) NewByRel(path string) *File
- func (my *File) RLock() *File
- func (my *File) RUnlock() *File
- func (my *File) Read() []byte
- func (my *File) Remove() *File
- func (my *File) Rename(newName string) *File
- func (my *File) Unlock() *File
- func (*File) WhoAmI() FilesystemV2Type
- func (my *File) Write(content []byte, mode os.FileMode, operations ...int) *File
- type FileFullPathEmptyError
- type FileInitError
- type FileNotExistsError
- type FilesystemV2Type
- type IFilesystemV2
- type PermissionDirError
- type PermissionFileError
- type ReadDirError
- type ReadFileError
- type RemoveDirError
- type RemoveFileError
- type RenameDirError
- type RenameFileError
- type WriteDirError
- type WriteFileError
Constants ¶
Variables ¶
View Source
var ( FileInitErr FileInitError FileNotExistsErr FileNotExistsError FileFullPathEmptyErr FileFullPathEmptyError CreateFileErr CreateFileError RenameFileErr RenameFileError RemoveFileErr RemoveFileError PermissionFileErr PermissionFileError CopyFileErr CopyFileError CopyFileSrcErr CopyFileSrcError CopyFileDstErr CopyFileDstError WriteFileErr WriteFileError ReadFileErr ReadFileError DirInitErr DirInitError DirNotExistsErr DirNotExistsError DirFullPathEmptyErr DirFullPathEmptyError CreateDirErr CreateDirError RenameDirErr RenameDirError RemoveDirErr RemoveDirError PermissionDirErr PermissionDirError CopyDirErr CopyDirError CopyDirSrcErr CopyDirSrcError CopyDirDstErr CopyDirDstError WriteDirErr WriteDirError ReadDirErr ReadDirError )
Functions ¶
func CopyFilesBy2Path ¶ added in v1.10.6
func CopyFilesBy2Path(srcPath, dstPath string)
CopyFilesBy2Path 批量复制文件:通过src绝对路径到dst绝对路径(无法指定拷贝后的文件名)
Types ¶
type CopyDirDstError ¶
func (*CopyDirDstError) Error ¶
func (my *CopyDirDstError) Error() string
func (*CopyDirDstError) Is ¶
func (*CopyDirDstError) Is(target error) bool
func (*CopyDirDstError) Panic ¶ added in v1.10.25
func (*CopyDirDstError) Panic() myError.IMyError
type CopyDirError ¶
func (*CopyDirError) Error ¶
func (my *CopyDirError) Error() string
func (*CopyDirError) Is ¶
func (*CopyDirError) Is(target error) bool
func (*CopyDirError) Panic ¶ added in v1.10.25
func (*CopyDirError) Panic() myError.IMyError
type CopyDirSrcError ¶
func (*CopyDirSrcError) Error ¶
func (my *CopyDirSrcError) Error() string
func (*CopyDirSrcError) Is ¶
func (*CopyDirSrcError) Is(target error) bool
func (*CopyDirSrcError) Panic ¶ added in v1.10.25
func (*CopyDirSrcError) Panic() myError.IMyError
type CopyFileDstError ¶
func (*CopyFileDstError) Error ¶
func (my *CopyFileDstError) Error() string
func (*CopyFileDstError) Is ¶
func (*CopyFileDstError) Is(target error) bool
func (*CopyFileDstError) Panic ¶ added in v1.10.25
func (*CopyFileDstError) Panic() myError.IMyError
type CopyFileError ¶
func (*CopyFileError) Error ¶
func (my *CopyFileError) Error() string
func (*CopyFileError) Is ¶
func (*CopyFileError) Is(target error) bool
func (*CopyFileError) Panic ¶ added in v1.10.25
func (*CopyFileError) Panic() myError.IMyError
type CopyFileSrcError ¶
func (*CopyFileSrcError) Error ¶
func (my *CopyFileSrcError) Error() string
func (*CopyFileSrcError) Is ¶
func (*CopyFileSrcError) Is(target error) bool
func (*CopyFileSrcError) Panic ¶ added in v1.10.25
func (*CopyFileSrcError) Panic() myError.IMyError
type CreateDirError ¶
func (*CreateDirError) Error ¶
func (my *CreateDirError) Error() string
func (*CreateDirError) Is ¶
func (*CreateDirError) Is(target error) bool
func (*CreateDirError) Panic ¶ added in v1.10.25
func (*CreateDirError) Panic() myError.IMyError
type CreateFileError ¶
func (*CreateFileError) Error ¶
func (my *CreateFileError) Error() string
func (*CreateFileError) Is ¶
func (*CreateFileError) Is(target error) bool
func (*CreateFileError) Panic ¶ added in v1.10.25
func (*CreateFileError) Panic() myError.IMyError
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
var DirApp Dir
func (*Dir) CheckPermission ¶
CheckPermission 检查目录权限
func (*Dir) CopyAllDirsTo ¶
CopyAllDirsTo 复制目录下所有文件夹及文件
func (*Dir) CopyAllFilesTo ¶
CopyAllFilesTo 复制所有文件
type DirCollection ¶
type DirFullPathEmptyError ¶
func (*DirFullPathEmptyError) Error ¶
func (my *DirFullPathEmptyError) Error() string
func (*DirFullPathEmptyError) Is ¶
func (*DirFullPathEmptyError) Is(target error) bool
func (*DirFullPathEmptyError) Panic ¶ added in v1.10.25
func (*DirFullPathEmptyError) Panic() myError.IMyError
type DirInitError ¶
func (*DirInitError) Error ¶
func (my *DirInitError) Error() string
func (*DirInitError) Is ¶
func (*DirInitError) Is(target error) bool
func (*DirInitError) Panic ¶ added in v1.10.25
func (*DirInitError) Panic() myError.IMyError
type DirNotExistsError ¶
func (*DirNotExistsError) Error ¶
func (my *DirNotExistsError) Error() string
func (*DirNotExistsError) Is ¶
func (*DirNotExistsError) Is(target error) bool
func (*DirNotExistsError) Panic ¶ added in v1.10.25
func (*DirNotExistsError) Panic() myError.IMyError
type File ¶
type File struct { Mime string // 文件Mime类型 // contains filtered or unexported fields }
var FileApp File
func (*File) CheckPermission ¶
CheckPermission 检查文件权限
func (*File) CreateDefaultMode ¶
type FileFullPathEmptyError ¶
func (*FileFullPathEmptyError) Error ¶
func (my *FileFullPathEmptyError) Error() string
func (*FileFullPathEmptyError) Is ¶
func (*FileFullPathEmptyError) Is(target error) bool
func (*FileFullPathEmptyError) New ¶
func (*FileFullPathEmptyError) New(msg string) myError.IMyError
func (*FileFullPathEmptyError) Panic ¶ added in v1.10.25
func (*FileFullPathEmptyError) Panic() myError.IMyError
type FileInitError ¶
func (*FileInitError) Error ¶
func (my *FileInitError) Error() string
func (*FileInitError) Is ¶
func (*FileInitError) Is(target error) bool
func (*FileInitError) Panic ¶ added in v1.10.25
func (*FileInitError) Panic() myError.IMyError
type FileNotExistsError ¶
func (*FileNotExistsError) Error ¶
func (my *FileNotExistsError) Error() string
func (*FileNotExistsError) Is ¶
func (*FileNotExistsError) Is(target error) bool
func (*FileNotExistsError) Panic ¶ added in v1.10.25
func (*FileNotExistsError) Panic() myError.IMyError
type FilesystemV2Type ¶
type FilesystemV2Type string
const ( FilesystemV2File FilesystemV2Type = "FILE" FilesystemV2Dir FilesystemV2Type = "DIR" )
type IFilesystemV2 ¶
type IFilesystemV2 interface{ WhoAmI() FilesystemV2Type }
type PermissionDirError ¶
func (*PermissionDirError) Error ¶
func (my *PermissionDirError) Error() string
func (*PermissionDirError) Is ¶
func (*PermissionDirError) Is(target error) bool
func (*PermissionDirError) Panic ¶ added in v1.10.25
func (*PermissionDirError) Panic() myError.IMyError
type PermissionFileError ¶
func (*PermissionFileError) Error ¶
func (my *PermissionFileError) Error() string
func (*PermissionFileError) Is ¶
func (*PermissionFileError) Is(target error) bool
func (*PermissionFileError) Panic ¶ added in v1.10.25
func (*PermissionFileError) Panic() myError.IMyError
type ReadDirError ¶
func (*ReadDirError) Error ¶
func (my *ReadDirError) Error() string
func (*ReadDirError) Is ¶
func (*ReadDirError) Is(target error) bool
func (*ReadDirError) Panic ¶ added in v1.10.25
func (*ReadDirError) Panic() myError.IMyError
type ReadFileError ¶
func (*ReadFileError) Error ¶
func (my *ReadFileError) Error() string
func (*ReadFileError) Is ¶
func (*ReadFileError) Is(target error) bool
func (*ReadFileError) Panic ¶ added in v1.10.25
func (*ReadFileError) Panic() myError.IMyError
type RemoveDirError ¶
func (*RemoveDirError) Error ¶
func (my *RemoveDirError) Error() string
func (*RemoveDirError) Is ¶
func (*RemoveDirError) Is(target error) bool
func (*RemoveDirError) Panic ¶ added in v1.10.25
func (*RemoveDirError) Panic() myError.IMyError
type RemoveFileError ¶
func (*RemoveFileError) Error ¶
func (my *RemoveFileError) Error() string
func (*RemoveFileError) Is ¶
func (*RemoveFileError) Is(target error) bool
func (*RemoveFileError) Panic ¶ added in v1.10.25
func (*RemoveFileError) Panic() myError.IMyError
type RenameDirError ¶
func (*RenameDirError) Error ¶
func (my *RenameDirError) Error() string
func (*RenameDirError) Is ¶
func (*RenameDirError) Is(target error) bool
func (*RenameDirError) Panic ¶ added in v1.10.25
func (*RenameDirError) Panic() myError.IMyError
type RenameFileError ¶
func (*RenameFileError) Error ¶
func (my *RenameFileError) Error() string
func (*RenameFileError) Is ¶
func (*RenameFileError) Is(target error) bool
func (*RenameFileError) Panic ¶ added in v1.10.25
func (*RenameFileError) Panic() myError.IMyError
type WriteDirError ¶
func (*WriteDirError) Error ¶
func (my *WriteDirError) Error() string
func (*WriteDirError) Is ¶
func (*WriteDirError) Is(target error) bool
func (*WriteDirError) Panic ¶ added in v1.10.25
func (*WriteDirError) Panic() myError.IMyError
type WriteFileError ¶
func (*WriteFileError) Error ¶
func (my *WriteFileError) Error() string
func (*WriteFileError) Is ¶
func (*WriteFileError) Is(target error) bool
func (*WriteFileError) Panic ¶ added in v1.10.25
func (*WriteFileError) Panic() myError.IMyError
Click to show internal directories.
Click to hide internal directories.