Documentation ¶
Index ¶
- func CreateFile(name string) (*os.File, error)
- func FileExist(path string) (exist bool, err error)
- func GetFileTime(path string) (cTime time.Time, aTime time.Time, mTime time.Time, err error)
- func GetFileTimeBySys(sys any) (cTime time.Time, aTime time.Time, mTime time.Time, err error)
- func IsDir(path string) (bool, error)
- func IsEOF(err error) bool
- func IsNonEOF(err error) bool
- func IsSub(parent, child string) (bool, error)
- func IsSymlink(path string) (bool, error)
- func IsSymlinkMode(mode fs.FileMode) bool
- func IsSymlinkSupported() bool
- func OpenRWFile(name string) (*os.File, error)
- func Readlink(name string) (string, error)
- func SafePath(path string) string
- func Symlink(oldname, newname string) error
- func SymlinkText(realPath string) string
- type GetFileTimeFunc
- type IsDirFunc
- type StatFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile create a file without truncate
func GetFileTime ¶
GetFileTime get the creation time, last access time, last modify time of the path
func GetFileTimeBySys ¶
GetFileTimeBySys get the creation time, last access time, last modify time of the FileInfo.Sys()
func IsSymlinkMode ¶
IsSymlinkMode check the mode is a symbolic link or not
func IsSymlinkSupported ¶
func IsSymlinkSupported() bool
IsSymlinkSupported checks if the system supports symbolic links
func OpenRWFile ¶
OpenRWFile open a file with read write mode
func SymlinkText ¶
SymlinkText build custom symlink text content
Types ¶
type GetFileTimeFunc ¶
type GetFileTimeFunc func(path string) (cTime time.Time, aTime time.Time, mTime time.Time, err error)
GetFileTimeFunc the function prototype of GetFileTime
Click to show internal directories.
Click to hide internal directories.