Documentation ¶
Index ¶
- Constants
- func AppendFile(path string, content []byte) (err error)
- func Chmod(filepath string, mode os.FileMode) (err error)
- func CopyFile(src, dst string) (err error)
- func Delete(path string) (err error)
- func ErrorIsDirectory(err error) bool
- func ErrorIsFileNotFound(err error) bool
- func FileExist(path string) (exist bool, err error)
- func FileExistIgnoreError(path string) bool
- func FileInfoIsDir(fi os.FileInfo) bool
- func FileInfoIsFile(fi os.FileInfo) bool
- func FileInfoIsSymlink(fi os.FileInfo) bool
- func FileModeIsSymlink(fm os.FileMode) bool
- func FileSync(f *os.File) error
- func FixedTmpDir() string
- func FullPathOnPath(workingPath string, path string) string
- func GetAllDir(root string) ([]string, error)
- func GetAllDirOneLevel(path string) (fileList []string, err error)
- func GetAllFiles(root string) (out []string, err error)
- func GetExt(path string) string
- func GetExtWithoutDot(path string) string
- func GetFileBaseWithoutExt(p string) string
- func GetFileModifyTime(path string) (modeTime time.Time, err error)
- func GetFileNameParseUrlv(in string) (out string)
- func GetFileSize(path string) (int64, error)
- func GetFileSizeOrZero(path string) int64
- func GetFullPath(inPath string) (string, error)
- func GetHomeDirPath() (string, error)
- func GetRelativePath(shortPath string, longPath string) (string, error)
- func GetSamePrefixPath(shortPath string, longPath string) string
- func GetTempDir() string
- func HasExt(path string, ext string) bool
- func IsDangerFullPath(thisPath string) bool
- func IsDotFile(path string) bool
- func IsExtInList(fileName string, extList []string) (isExtInList bool)
- func IsSymlink(path string) bool
- func Mkdir(path string) (err error)
- func MkdirForFile(path string) (err error)
- func MkdirForFile777(path string) (err error)
- func MustAppendFile(path string, content []byte)
- func MustAppendFileAddLineEnd(path string, content []byte)
- func MustChangeDir(dir string)
- func MustChangeToTmpPath() string
- func MustChdir(dir string)
- func MustCheckContentAndWriteFileWithMkdir(path string, content []byte)
- func MustCheckContentAndWriteFileWithMkdirWithCorrectFold(path string, content []byte)
- func MustCheckContentAndWriteVFileItemList(basePath string, vfileSet []VFileItem)
- func MustCheckContentCopyWithoutMerge(src, dst string)
- func MustChmod(filepath string, mode os.FileMode)
- func MustCopy(src string, dst string)
- func MustCopyFile(src, dst string)
- func MustCopyFileIgnoreNotExist(src, dst string)
- func MustCopyV2(req MustCopyV2Request)
- func MustCopyWithFilter(src string, dst string, filter func(fullpath string) bool)
- func MustDelete(path string)
- func MustDeleteFile(path string)
- func MustDeleteFileOrDirectory(path string)
- func MustDirectoryExist(path string) bool
- func MustEnsureBinPath(finalPath string)
- func MustEnsureDir777(path string)
- func MustFileContainsString(path string, toSearchString string) bool
- func MustFileExist(path string) bool
- func MustFileSystemItemInfoEqual(a StatAndFullPath, b StatAndFullPath) bool
- func MustFileWalk(root string, fn func(ctx *WalkContext))
- func MustGetAllDir(root string) (out []string)
- func MustGetAllDirFollowSymlink(root string) (dirList []string)
- func MustGetAllDirOneLevel(path string) (fileList []string)
- func MustGetAllDirSort(root string) (out []string)
- func MustGetAllFileAndDirAndSymlink(root string) (out []string)
- func MustGetAllFileFollowSymlink(root string) (fileList []string)
- func MustGetAllFileFromPathList(pathlist []string) (outList []string)
- func MustGetAllFileOneLevel(path string) (fileList []string)
- func MustGetAllFiles(root string) (out []string)
- func MustGetAllFilesSort(root string) (out []string)
- func MustGetAllSymlinkPathList(path string) (out []string)
- func MustGetDirectorySize(path string) int64
- func MustGetFileModifyTime(path string) (modeTime time.Time)
- func MustGetFileOrDirectoryNameWithRealFold(path string) string
- func MustGetFilePerm(path string) os.FileMode
- func MustGetFileSize(path string) int64
- func MustGetFullPath(inPath string) string
- func MustGetHomeDirPath() string
- func MustGetRelativePath(shortPath string, longPath string) string
- func MustGetWd() string
- func MustIsDir(filepath string) bool
- func MustIsFile(filepath string) bool
- func MustIsFileOrDirectoryNameFoldCorrect(path string) bool
- func MustMkdir(dirname string)
- func MustMkdir777(path string)
- func MustMkdirAll(dirname string)
- func MustMkdirForFile(path string)
- func MustMkdirForFile777(path string)
- func MustMove(srcPath string, dstPath string)
- func MustMoveNameFoldCorrect(fromPath string, toPath string)
- func MustOnlyFileExist(path string) bool
- func MustReadDirFileOneLevel(path string) (fileList []string)
- func MustReadFile(path string) (content []byte)
- func MustReadFileAll(path string) (content []byte)
- func MustReadFileAtStartPosWithLen(path string, startPos int64, thisLen int64) (content []byte)
- func MustReadFileOrIgnore(path string) (content []byte)
- func MustReadFileToBufW(path string, bufW *udwBytes.BufWriter)
- func MustReadSymlink(path string) string
- func MustRealPath(inPath string) string
- func MustRename(oldpath string, newpath string)
- func MustSetWd(workdingDirectory string)
- func MustSymlink(realPath string, linkPath string)
- func MustSymlinkFullPath(realPath string, linkPath string)
- func MustSymlinkRel(realPath string, linkPath string)
- func MustWalkV2(root string, cb func(st StatAndFullPath) int)
- func MustWriteFile(path string, content []byte)
- func MustWriteFileAndMove(req WriteFileAndMoveReq)
- func MustWriteFileWithMkdir(path string, content []byte)
- func NewTmpFilePath() string
- func NewTmpFilePathWithExt(ext string) string
- func OnlyFileExist(path string) (exist bool, err error)
- func PathBaseWithoutExt(path string) string
- func PathClean(path string) string
- func PathTrimExt(path string) string
- func ReadDir(dirname string) ([]os.FileInfo, error)
- func ReadDirFileOneLevel(path string) (fileList []string, err error)
- func ReadFile(path string) (content []byte, err error)
- func ReadFileAll(path string) (content []byte, err error)
- func ReadFileToBufW(path string, bufW *udwBytes.BufWriter) (err error)
- func Realpath(inPath string) (string, error)
- func RemoveExtFromFilePath(path string) string
- func SearchFileInParentDir(startDirPath string, fileName string) (file string, err error)
- func SymlinkIsDirectory(path string) bool
- func TailByte(filePath string, size int64) (content []byte, err error)
- func TruncateFileToAimSizeFromEnd(filePath string, length int64) (err error)
- func VFileSetAddDirPath(basePath string, vfileSet []VFileItem)
- func VFileSetSort(vfileSet []VFileItem)
- func WriteFile(path string, content []byte) (err error)
- func WriteFileAndMove(req WriteFileAndMoveReq) (err error)
- func WriteFileWithMkdir(path string, content []byte) (err error)
- type DirectoryFileTransform
- type MustCopyV2Request
- type PathAndContentPair
- type StatAndFullPath
- func GetAllFileAndDirectoryStat(root string) (out []StatAndFullPath, err error)
- func GetAllFileAndDirectoryStatWithFilter(root string, filter func(path string, info os.FileInfo) bool) (out []StatAndFullPath, err error)
- func MustGetAllFileAndDirectoryStat(root string) (out []StatAndFullPath)
- func MustGetAllFileAndStatOneLevel(path string) (fileAndStatList []StatAndFullPath)
- func MustGetAllStatAndFullPathOneLevel(path string) (fileAndStatList []StatAndFullPath)
- type VFileItem
- type WalkContext
- type WriteFileAndMoveReq
Constants ¶
View Source
const WalkV2RespBreak = 3
View Source
const WalkV2RespNext = 1
View Source
const WalkV2RespSkipDir = 2
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶
func ErrorIsDirectory ¶
func ErrorIsFileNotFound ¶
func FileExistIgnoreError ¶
func FileInfoIsDir ¶
func FileInfoIsFile ¶
func FileInfoIsSymlink ¶
func FileModeIsSymlink ¶
func FixedTmpDir ¶
func FixedTmpDir() string
func FullPathOnPath ¶
func GetAllDirOneLevel ¶
func GetAllFiles ¶
func GetExtWithoutDot ¶
func GetFileBaseWithoutExt ¶
func GetFileNameParseUrlv ¶
func GetFileSize ¶
func GetFileSizeOrZero ¶
func GetFullPath ¶
func GetHomeDirPath ¶
func GetSamePrefixPath ¶
func GetTempDir ¶
func GetTempDir() string
func IsDangerFullPath ¶
func IsExtInList ¶
func MkdirForFile ¶
func MkdirForFile777 ¶
func MustAppendFile ¶
func MustChangeDir ¶
func MustChangeDir(dir string)
func MustChangeToTmpPath ¶
func MustChangeToTmpPath() string
func MustCheckContentCopyWithoutMerge ¶
func MustCheckContentCopyWithoutMerge(src, dst string)
func MustCopyFile ¶
func MustCopyFile(src, dst string)
func MustCopyFileIgnoreNotExist ¶
func MustCopyFileIgnoreNotExist(src, dst string)
func MustCopyV2 ¶
func MustCopyV2(req MustCopyV2Request)
func MustCopyWithFilter ¶
func MustDelete ¶
func MustDelete(path string)
func MustDeleteFile ¶
func MustDeleteFile(path string)
func MustDeleteFileOrDirectory ¶
func MustDeleteFileOrDirectory(path string)
func MustDirectoryExist ¶
func MustEnsureBinPath ¶
func MustEnsureBinPath(finalPath string)
func MustEnsureDir777 ¶
func MustEnsureDir777(path string)
func MustFileContainsString ¶
func MustFileExist ¶
func MustFileSystemItemInfoEqual ¶
func MustFileSystemItemInfoEqual(a StatAndFullPath, b StatAndFullPath) bool
func MustFileWalk ¶
func MustFileWalk(root string, fn func(ctx *WalkContext))
func MustGetAllDir ¶
func MustGetAllDirOneLevel ¶
func MustGetAllDirSort ¶
func MustGetAllFileOneLevel ¶
func MustGetAllFiles ¶
func MustGetAllFilesSort ¶
func MustGetDirectorySize ¶
func MustGetFileModifyTime ¶
func MustGetFilePerm ¶
func MustGetFileSize ¶
func MustGetFullPath ¶
func MustGetHomeDirPath ¶
func MustGetHomeDirPath() string
func MustGetRelativePath ¶
func MustIsFile ¶
func MustMkdir777 ¶
func MustMkdir777(path string)
func MustMkdirAll ¶
func MustMkdirAll(dirname string)
func MustMkdirForFile ¶
func MustMkdirForFile(path string)
func MustMkdirForFile777 ¶
func MustMkdirForFile777(path string)
func MustMoveNameFoldCorrect ¶
func MustOnlyFileExist ¶
func MustReadDirFileOneLevel ¶
func MustReadFile ¶
func MustReadFileAll ¶
func MustReadFileOrIgnore ¶
func MustReadFileToBufW ¶
func MustReadSymlink ¶
func MustRealPath ¶
func MustRename ¶
func MustSymlink ¶
func MustSymlinkFullPath ¶
func MustSymlinkRel ¶
func MustWalkV2 ¶
func MustWalkV2(root string, cb func(st StatAndFullPath) int)
func MustWriteFile ¶
func MustWriteFileAndMove ¶
func MustWriteFileAndMove(req WriteFileAndMoveReq)
func MustWriteFileWithMkdir ¶
func NewTmpFilePath ¶
func NewTmpFilePath() string
func NewTmpFilePathWithExt ¶
func OnlyFileExist ¶
func PathBaseWithoutExt ¶
func PathTrimExt ¶
func ReadDirFileOneLevel ¶
func ReadFileAll ¶
func RemoveExtFromFilePath ¶
func SearchFileInParentDir ¶
func SymlinkIsDirectory ¶
func VFileSetAddDirPath ¶
func VFileSetSort ¶
func VFileSetSort(vfileSet []VFileItem)
func WriteFileAndMove ¶
func WriteFileAndMove(req WriteFileAndMoveReq) (err error)
func WriteFileWithMkdir ¶
Types ¶
type DirectoryFileTransform ¶
type MustCopyV2Request ¶
type MustCopyV2Request struct { Src string Dst string IsCopyFilter func(stat StatAndFullPath) bool AfterCopyFilter func(before StatAndFullPath, afterPath string) bool }
type PathAndContentPair ¶
type StatAndFullPath ¶
func GetAllFileAndDirectoryStat ¶
func GetAllFileAndDirectoryStat(root string) (out []StatAndFullPath, err error)
func MustGetAllFileAndDirectoryStat ¶
func MustGetAllFileAndDirectoryStat(root string) (out []StatAndFullPath)
func MustGetAllFileAndStatOneLevel ¶
func MustGetAllFileAndStatOneLevel(path string) (fileAndStatList []StatAndFullPath)
func MustGetAllStatAndFullPathOneLevel ¶
func MustGetAllStatAndFullPathOneLevel(path string) (fileAndStatList []StatAndFullPath)
type WalkContext ¶
type WalkContext struct { StatAndFullPath // contains filtered or unexported fields }
func (*WalkContext) GetRelPath ¶
func (ctx *WalkContext) GetRelPath() string
func (*WalkContext) SkipDir ¶
func (ctx *WalkContext) SkipDir()
func (*WalkContext) StopWalk ¶
func (ctx *WalkContext) StopWalk()
type WriteFileAndMoveReq ¶
Source Files ¶
- AllFile.go
- DirectoryFileTransform.go
- EnsureBinPath.go
- EnsureDir777.go
- FileExist.go
- GetFileNameWithRealFold.go
- GetFileNameWithRealFold_linux.go
- PathClean.go
- ReadFile.go
- SearchPath.go
- chmod.go
- copy.go
- copyV2.go
- deprecated.go
- error.go
- ext.go
- fileInfo.go
- filePath.go
- fileWalk.go
- fileWalkFollowSymlink.go
- file_sync.go
- fixedTmpFile_other.go
- fullPath.go
- homePath.go
- rel.go
- searchString.go
- size.go
- symLink.go
- tmpPath.go
- udwFile.go
- udwFileMkdir.go
- vFileSet.go
- writeAndMove.go
Click to show internal directories.
Click to hide internal directories.