Documentation
¶
Index ¶
- Variables
- type File
- func (f *File) Close() error
- func (f *File) Name() string
- func (f *File) Read(buf []byte) (int, error)
- func (f *File) ReadAt(buf []byte, offset int64) (int, error)
- func (f *File) Readdir(count int) ([]os.FileInfo, error)
- func (f *File) Readdirnames(count int) ([]string, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Truncate(size int64) error
- func (f *File) Write(buf []byte) (int, error)
- func (f *File) WriteAt(buf []byte, off int64) (int, error)
- func (f *File) WriteString(s string) (int, error)
- type FileInfo
- type Fs
- func (fs *Fs) Chmod(path string, mode os.FileMode) error
- func (fs *Fs) Chown(path string, uid int, gid int) error
- func (fs *Fs) Chtimes(path string, atime time.Time, mtime time.Time) error
- func (fs *Fs) Create(path string) (afero.File, error)
- func (fs *Fs) Mkdir(path string, perm os.FileMode) error
- func (fs *Fs) MkdirAll(path string, perm os.FileMode) error
- func (fs *Fs) Name() string
- func (fs *Fs) Open(path string) (afero.File, error)
- func (fs *Fs) OpenFile(path string, flag int, perm os.FileMode) (afero.File, error)
- func (fs *Fs) Remove(path string) error
- func (fs *Fs) RemoveAll(path string) error
- func (fs *Fs) Rename(oldPath, newPath string) error
- func (fs *Fs) Stat(path string) (os.FileInfo, error)
- func (fs *Fs) Unmount() error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) Readdir ¶
os.File.Readdir spec: Readdir reads the contents of the directory associated with file and returns a slice of up to n FileInfo values, as would be returned by Lstat, in directory order. Subsequent calls on the same file will yield further FileInfos.
If n > 0, Readdir returns at most n FileInfo structures. In this case, if Readdir returns an empty slice, it will return a non-nil error explaining why. At the end of a directory, the error is io.EOF.
If n <= 0, Readdir returns all the FileInfo from the directory in a single slice. In this case, if Readdir succeeds (reads all the way to the end of the directory), it returns the slice and a nil error. If it encounters an error before the end of the directory, Readdir returns the FileInfo read until that point and a non-nil error.
note: cephfs does not have any restriction on reproducible ordering of directories. if we run into issues with this in the future we'll have to redo this function. That would likely involve having our own read itterator and instead of reading one file at a time, we read them all (-1) and sort them before culling the list to the requested ammount and returning
func (*File) Readdirnames ¶
list items in directory only by name
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
implements os.FileInfo interface for CephFS.
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
func (*Fs) Create ¶
Create creates a file in the filesystem, returning the file and an error, if any happens.
func (*Fs) RemoveAll ¶
RemoveAll removes a directory path and any children it contains. It does not fail if the path does not exist (return nil).