pkg

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSApi

type FSApi interface {
	// Open  打开文件
	Open(path string) (*os.File, error)
	// OpenFile 打开或创建文件
	OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
	// MkdirAll 递归创建目录
	MkdirAll(path string) error
	// Remove 删除文件
	Remove(path string) error
	// Rename 重命名文件
	Rename(oldPath, newPath string) error
	// FileExists 文件是否存在
	FileExists(path string) bool
	// EnsureDirExist 确保目录存在
	EnsureDirExist(ps ...string)
	// PathToInode path转inode
	PathToInode(path string) int64
	// InodeToPath inode转path
	InodeToPath(inode int64) string
	// InodeToFileInfo inode转fileInfo
	InodeToFileInfo(inode int64) *gateway.FileInfoRes
	// InodesToFileInfos inodes转fileInfos
	InodesToFileInfos(inodes ...int64) map[string]gateway.FileInfoRes
}

Jump to

Keyboard shortcuts

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