Documentation ¶
Index ¶
- Variables
- type File
- func (f *File) Chdir() error
- func (f *File) Chmod(mode os.FileMode) error
- func (f *File) Chown(uid, gid int) error
- func (f *File) Close() error
- func (f *File) Name() string
- func (f *File) Read(b []byte) (int, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Truncate(size int64) error
- func (f *File) Write(b []byte) (int, error)
- func (f *File) WriteString(s string) (int, error)
- type Volume
- func (v *Volume) Chdir(dir string) error
- func (v *Volume) Close() error
- func (v *Volume) Create(name string) (file *File, err error)
- func (v *Volume) Getwd() (dir string, err error)
- func (v *Volume) Open(name string) (file *File, err error)
- func (v *Volume) OpenFile(name string, flag int, perm os.FileMode) (file *File, err error)
- func (v *Volume) Remove(name string) error
- func (v *Volume) RemoveAll(path string) 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) Chdir ¶
Chdir changes the current working directory to the file, which must be a directory. If there is an error, it will be of type *PathError.
func (*File) Close ¶
Close closes the File, rendering it unusable for I/O. It returns an error, if any.
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
func (*Volume) Create ¶
Create creates the named file mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR. If there is an error, it will be of type *PathError.
func (*Volume) 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. If there is an error, it will be of type *PathError.
func (*Volume) OpenFile ¶
OpenFile is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, methods on the returned File can be used for I/O. If there is an error, it will be of type *PathError.