Documentation ¶
Index ¶
- Variables
- func CopyDir(dst, src string) error
- func CopyFile(old, new string) error
- func CopyN(writer io.Writer, src io.Reader, size int64) (int64, error)
- func CreateFile(filename string, perm os.FileMode) (*os.File, error)
- func CreatePath(path string) error
- func DecodeFileModifyTime(filename string, lastModifyTime int64, decoder DecodeFunc) (int64, interface{}, error)
- func DirEmpty(path string) bool
- func IsDir(f string) int
- func IsExist(f string) bool
- func IsFile(f string) bool
- func MD5(filename string) string
- func MD5Byte(src io.Reader) []byte
- func MD5ByteSize(src io.Reader) ([]byte, int64)
- func MD5Reader(src io.Reader) string
- func MD5Size(src io.Reader) (string, int64)
- func Open(filename string) (*os.File, int64, error)
- func Read(f io.Reader, size int) ([]byte, error)
- func ReadDir(path string, depth *Depth, ...) error
- func ReadFile(f *os.File) ([]byte, error)
- func ReadFileModifyTime(filename string, lastModifyTime int64) (int64, []byte, error)
- func ReadFileName(filename string, reader func(r *os.File) error) (int64, error)
- func SameFile(a, b string) (bool, error)
- func Write(filename string, src io.Reader, perm os.FileMode) error
- func WriteFileName(filename string, perm os.FileMode, writer func(w *os.File) error) error
- func WriteOut(filename string, src io.Reader, perm os.FileMode, outer func(w *os.File) error) error
- type DecodeFunc
- type Depth
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotModified = errors.New("file not modified")
Functions ¶
func CreateFile ¶ added in v1.8.68
func CreatePath ¶ added in v1.6.11
func DecodeFileModifyTime ¶ added in v1.8.65
func DecodeFileModifyTime(filename string, lastModifyTime int64, decoder DecodeFunc) (int64, interface{}, error)
func MD5ByteSize ¶ added in v1.8.75
MD5ByteSize return md5 bytes and file's size
func ReadDir ¶ added in v1.8.69
func ReadDir(path string, depth *Depth, handler func(name string, isDir bool, entry os.DirEntry) int) error
ReadDir handler return 1: ignore, 0: ok, other: err
func ReadFileModifyTime ¶ added in v1.8.65
func ReadFileName ¶ added in v1.8.68
func SameFile ¶ added in v1.21.5
SameFile returns true if the two given paths refer to the same physical file on disk, using the unique file identifiers from the underlying operating system. For example, on Unix systems this checks whether the two files are on the same device and have the same inode.
func WriteFileName ¶ added in v1.8.68
Types ¶
type DecodeFunc ¶ added in v1.8.65
Click to show internal directories.
Click to hide internal directories.