Documentation ¶
Index ¶
- Constants
- func GetAppInfo(code string) (*entity.AppRegisterInfo, error)
- type StorageApi
- func (s StorageApi) Chtimes(path string, atime time.Time, mtime time.Time) error
- func (s StorageApi) EnsureDirExist(ps ...string)
- func (s StorageApi) FileExists(path string) bool
- func (s StorageApi) InodeToFileInfo(inode int64) *dto.FileInfoRes
- func (s StorageApi) InodeToPath(inode int64) string
- func (s StorageApi) InodesToFileInfos(inodes ...int64) map[int64]dto.FileInfoRes
- func (s StorageApi) MkdirAll(path string) error
- func (s StorageApi) Open(path string) (*os.File, *net.UnixConn, string, error)
- func (s StorageApi) OpenFile(path string, flag int, perm os.FileMode) (*os.File, *net.UnixConn, string, error)
- func (s StorageApi) PathToInode(path string) int64
- func (s StorageApi) Remove(path string) error
- func (s StorageApi) Rename(oldPath, newPath string) error
Constants ¶
View Source
const CoreHTTPPort = 40100
View Source
const LocalhostAddress = "http://10.62.0.1"
View Source
const OSHTTPPort = 40000
View Source
const UnixSocketPrefix = "/siyouyun/unix-socket/"
Variables ¶
This section is empty.
Functions ¶
func GetAppInfo ¶
func GetAppInfo(code string) (*entity.AppRegisterInfo, error)
Types ¶
type StorageApi ¶ added in v0.1.21
type StorageApi struct {
// contains filtered or unexported fields
}
func NewStorageApi ¶ added in v0.1.21
func NewStorageApi(un *utils.UserNamespace) *StorageApi
func (StorageApi) EnsureDirExist ¶ added in v0.1.21
func (s StorageApi) EnsureDirExist(ps ...string)
EnsureDirExist 确保目录存在
func (StorageApi) FileExists ¶ added in v0.1.21
func (s StorageApi) FileExists(path string) bool
FileExists 文件是否存在
func (StorageApi) InodeToFileInfo ¶ added in v0.1.21
func (s StorageApi) InodeToFileInfo(inode int64) *dto.FileInfoRes
InodeToFileInfo inode转fileInfo
func (StorageApi) InodeToPath ¶ added in v0.1.21
func (s StorageApi) InodeToPath(inode int64) string
InodeToPath inode转path
func (StorageApi) InodesToFileInfos ¶ added in v0.1.21
func (s StorageApi) InodesToFileInfos(inodes ...int64) map[int64]dto.FileInfoRes
InodesToFileInfos inodes转fileInfos
func (StorageApi) MkdirAll ¶ added in v0.1.21
func (s StorageApi) MkdirAll(path string) error
MkdirAll 递归创建目录
func (StorageApi) OpenFile ¶ added in v0.1.21
func (s StorageApi) OpenFile(path string, flag int, perm os.FileMode) (*os.File, *net.UnixConn, string, error)
OpenFile 打开或创建文件
func (StorageApi) PathToInode ¶ added in v0.1.21
func (s StorageApi) PathToInode(path string) int64
PathToInode path转inode
func (StorageApi) Remove ¶ added in v0.1.21
func (s StorageApi) Remove(path string) error
Remove 删除文件
func (StorageApi) Rename ¶ added in v0.1.21
func (s StorageApi) Rename(oldPath, newPath string) error
Rename 重命名文件
Click to show internal directories.
Click to hide internal directories.