|
@@ -6,7 +6,7 @@ import (
|
|
|
"path/filepath"
|
|
|
"time"
|
|
|
|
|
|
- "imuslab.com/arozos/mod/filesystem/fsdef"
|
|
|
+ "imuslab.com/arozos/mod/filesystem/arozfs"
|
|
|
)
|
|
|
|
|
|
/*
|
|
@@ -24,43 +24,43 @@ func NewEmptyFileSystemAbstraction() EmptyFileSystemAbstraction {
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) Chmod(filename string, mode os.FileMode) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Chown(filename string, uid int, gid int) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Chtimes(filename string, atime time.Time, mtime time.Time) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
-func (l EmptyFileSystemAbstraction) Create(filename string) (*os.File, error) {
|
|
|
- return nil, fsdef.ErrNullOperation
|
|
|
+func (l EmptyFileSystemAbstraction) Create(filename string) (arozfs.File, error) {
|
|
|
+ return nil, arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Mkdir(filename string, mode os.FileMode) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) MkdirAll(filename string, mode os.FileMode) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Name() string {
|
|
|
return ""
|
|
|
}
|
|
|
-func (l EmptyFileSystemAbstraction) Open(filename string) (*os.File, error) {
|
|
|
- return nil, fsdef.ErrNullOperation
|
|
|
+func (l EmptyFileSystemAbstraction) Open(filename string) (arozfs.File, error) {
|
|
|
+ return nil, arozfs.ErrNullOperation
|
|
|
}
|
|
|
-func (l EmptyFileSystemAbstraction) OpenFile(filename string, flag int, perm os.FileMode) (*os.File, error) {
|
|
|
- return nil, fsdef.ErrNullOperation
|
|
|
+func (l EmptyFileSystemAbstraction) OpenFile(filename string, flag int, perm os.FileMode) (arozfs.File, error) {
|
|
|
+ return nil, arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Remove(filename string) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) RemoveAll(path string) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Rename(oldname, newname string) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Stat(filename string) (os.FileInfo, error) {
|
|
|
- return nil, fsdef.ErrNullOperation
|
|
|
+ return nil, arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) Close() error {
|
|
|
return nil
|
|
@@ -71,11 +71,11 @@ func (l EmptyFileSystemAbstraction) Close() error {
|
|
|
*/
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) VirtualPathToRealPath(subpath string, username string) (string, error) {
|
|
|
- return "", fsdef.ErrVpathResolveFailed
|
|
|
+ return "", arozfs.ErrVpathResolveFailed
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) RealPathToVirtualPath(fullpath string, username string) (string, error) {
|
|
|
- return "", fsdef.ErrRpathResolveFailed
|
|
|
+ return "", arozfs.ErrRpathResolveFailed
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) FileExists(realpath string) bool {
|
|
@@ -87,7 +87,7 @@ func (l EmptyFileSystemAbstraction) IsDir(realpath string) bool {
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) Glob(realpathWildcard string) ([]string, error) {
|
|
|
- return []string{}, fsdef.ErrNullOperation
|
|
|
+ return []string{}, arozfs.ErrNullOperation
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) GetFileSize(realpath string) int64 {
|
|
@@ -95,22 +95,22 @@ func (l EmptyFileSystemAbstraction) GetFileSize(realpath string) int64 {
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) GetModTime(realpath string) (int64, error) {
|
|
|
- return 0, fsdef.ErrOperationNotSupported
|
|
|
+ return 0, arozfs.ErrOperationNotSupported
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) WriteFile(filename string, content []byte, mode os.FileMode) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) ReadFile(filename string) ([]byte, error) {
|
|
|
- return []byte(""), fsdef.ErrOperationNotSupported
|
|
|
+ return []byte(""), arozfs.ErrOperationNotSupported
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) WriteStream(filename string, stream io.Reader, mode os.FileMode) error {
|
|
|
- return fsdef.ErrNullOperation
|
|
|
+ return arozfs.ErrNullOperation
|
|
|
}
|
|
|
func (l EmptyFileSystemAbstraction) ReadStream(filename string) (io.ReadCloser, error) {
|
|
|
- return nil, fsdef.ErrOperationNotSupported
|
|
|
+ return nil, arozfs.ErrOperationNotSupported
|
|
|
}
|
|
|
|
|
|
func (l EmptyFileSystemAbstraction) Walk(root string, walkFn filepath.WalkFunc) error {
|
|
|
- return fsdef.ErrOperationNotSupported
|
|
|
+ return arozfs.ErrOperationNotSupported
|
|
|
}
|