Documentation
¶
Index ¶
- type FType
- type FileHandler
- func (h *FileHandler) Close() error
- func (h *FileHandler) Lock()
- func (h *FileHandler) Name() string
- func (h *FileHandler) Open() (err error)
- func (h *FileHandler) Read(p []byte) (int, error)
- func (h *FileHandler) Reload() error
- func (h *FileHandler) Remove() error
- func (h *FileHandler) Seek(offset int64, whence int) (int64, error)
- func (h *FileHandler) Truncate(size int64) (err error)
- func (h *FileHandler) Unlock()
- func (h *FileHandler) Write(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileHandler ¶
type FileHandler struct {
// contains filtered or unexported fields
}
FileHandler defines a file handle structure responsible for controlling file access and operations.
func NewFileHandler ¶
func NewFileHandler(fname string, ft FType) (*FileHandler, error)
NewFileHandler returns a pointer to the file handler which opens either a temporary or a permanent file underneath.
func (*FileHandler) Remove ¶
func (h *FileHandler) Remove() error
Remove attempts to remove a file from the file system.
func (*FileHandler) Seek ¶
func (h *FileHandler) Seek(offset int64, whence int) (int64, error)
Seek seeks to an offset in a file.
func (*FileHandler) Truncate ¶
func (h *FileHandler) Truncate(size int64) (err error)
Truncate truncates a file to size.
Click to show internal directories.
Click to hide internal directories.