fs

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearDeletedFile

func ClearDeletedFile(clearPath string) error

ClearDeletedFile remove all the deleted files in the path

func CreateFile

func CreateFile(name string) (*os.File, error)

CreateFile create a file without truncate

func FileExist

func FileExist(path string) (exist bool, err error)

FileExist is file Exist

func GetFileTime

func GetFileTime(path string) (cTime time.Time, aTime time.Time, mTime time.Time, err error)

GetFileTime get the creation time, last access time, last modify time of the path

func GetFileTimeBySys

func GetFileTimeBySys(sys any) (cTime time.Time, aTime time.Time, mTime time.Time, err error)

GetFileTimeBySys get the creation time, last access time, last modify time of the FileInfo.Sys()

func IsDeleted

func IsDeleted(path string) bool

IsDeleted is deleted path

func IsDir added in v0.3.0

func IsDir(path string) (bool, error)

IsDir the path is directory or not

func IsEOF added in v0.3.4

func IsEOF(err error) bool

IsEOF whether the error is io.EOF

func IsNonEOF added in v0.3.4

func IsNonEOF(err error) bool

IsNonEOF whether the error is not io.EOF and is not nil

func LogicallyDelete

func LogicallyDelete(path string) error

LogicallyDelete delete the path logically

func OpenRWFile

func OpenRWFile(name string) (*os.File, error)

OpenRWFile open a file with read write mode

Types

This section is empty.

Jump to

Keyboard shortcuts

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