Documentation
¶
Index ¶
- Constants
- Variables
- type FS
- type Handle
- func (h *Handle) Chdir() error
- func (h *Handle) Chmod(mode os.FileMode) error
- func (h *Handle) Chown(uid, gid int) error
- func (h *Handle) Close() error
- func (h *Handle) Fd() uintptr
- func (h *Handle) Name() string
- func (h *Handle) Node() (node.Node, error)
- func (h *Handle) Read(b []byte) (n int, err error)
- func (h *Handle) ReadAt(b []byte, off int64) (n int, err error)
- func (h *Handle) Readdir(n int) ([]os.FileInfo, error)
- func (h *Handle) Readdirnames(n int) ([]string, error)
- func (h *Handle) Seek(offset int64, whence int) (ret int64, err error)
- func (h *Handle) Stat() (os.FileInfo, error)
- func (h *Handle) Sync() error
- func (h *Handle) Truncate(size int64) error
- func (h *Handle) Write(b []byte) (n int, err error)
- func (h *Handle) WriteAt(b []byte, off int64) (n int, err error)
- func (h *Handle) WriteString(s string) (n int, err error)
- type KFS
- func (kfs *KFS) Chdir(dir string) error
- func (kfs *KFS) Chmod(name string, mode os.FileMode) error
- func (kfs *KFS) Create(name string) (*Handle, error)
- func (kfs *KFS) GetDir(path string) (dir *node.Dir, err error)
- func (kfs *KFS) GetFile(path string) (*node.File, error)
- func (kfs *KFS) GetNode(path string) (n node.Node, err error)
- func (kfs *KFS) Getwd() (dir string, err error)
- func (kfs *KFS) Lstat(name string) (os.FileInfo, error)
- func (kfs *KFS) Mkdir(name string, perm os.FileMode) error
- func (kfs *KFS) MkdirAll(path string, perm os.FileMode) error
- func (kfs *KFS) Object() *object.Obj
- func (kfs *KFS) Open(name string) (*Handle, error)
- func (kfs *KFS) OpenFile(name string, flags int, perm os.FileMode) (h *Handle, err error)
- func (kfs *KFS) ReadDir(path string) ([]*object.Metadata, error)
- func (kfs *KFS) Remove(name string) error
- func (kfs *KFS) RemoveAll(name string) error
- func (kfs *KFS) Rename(oldPath, newPath string) error
- func (kfs *KFS) Root() *node.Dir
- func (kfs *KFS) Stat(name string) (os.FileInfo, error)
- func (kfs *KFS) Storage() storage.Storage
- func (kfs *KFS) Truncate(name string, size int64) error
- type LinkError
- type OsFiler
- type PathError
Constants ¶
const DevNull = "/dev/null"
Variables ¶
var ErrWriteAtInAppendMode = errors.New("os: invalid use of WriteAt on file opened with O_APPEND")
Functions ¶
This section is empty.
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
baseHandle implements all the missing methods
type KFS ¶
func (*KFS) Create ¶
Create creates or truncates the named file. If the file already exists, it is truncated. If the file does not exist, it is created with mode 0666 (before umask). If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR.
func (*KFS) Lstat ¶
Lstat returns a FileInfo describing the named file. If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no attempt to follow the link.
func (*KFS) Mkdir ¶
Mkdir creates a new directory with the specified name and permission bits (before umask).
func (*KFS) MkdirAll ¶
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm (before umask) are used for all directories that MkdirAll creates.
func (*KFS) Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY.
func (*KFS) RemoveAll ¶
RemoveAll removes path and any children it contains. It removes everything it can but returns the first error it encounters. If the path does not exist, RemoveAll returns nil (no error).
func (*KFS) Rename ¶
Rename renames (moves) oldpath to newpath. If newpath already exists and is not a directory, Rename replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.
type OsFiler ¶
type OsFiler interface { Chdir() error Chmod(mode os.FileMode) error Chown(uid, gid int) error Close() error Fd() uintptr Name() string Read(b []byte) (n int, err error) ReadAt(b []byte, off int64) (n int, err error) Readdir(n int) ([]os.FileInfo, error) Readdirnames(n int) (names []string, err error) Seek(offset int64, whence int) (ret int64, err error) Stat() (os.FileInfo, error) Sync() error Truncate(size int64) error Write(b []byte) (n int, err error) WriteAt(b []byte, off int64) (n int, err error) WriteString(s string) (n int, err error) }
OsFiler is the methods on *os.File