Documentation ¶
Index ¶
- func SaveToDataFolder(saver Saver, filename string, dataFolder DataFolder) error
- type DataFolder
- type DiskDataFolder
- func (folder *DiskDataFolder) CleanFolder() error
- func (folder *DiskDataFolder) CreateFile(filename string) error
- func (folder *DiskDataFolder) DeleteFile(filename string) error
- func (folder *DiskDataFolder) FileExists(filename string) bool
- func (folder *DiskDataFolder) OpenReadonlyFile(filename string) (io.ReadCloser, error)
- func (folder *DiskDataFolder) OpenWriteOnlyFile(filename string) (io.WriteCloser, error)
- type FileSystemCleaner
- type NoSuchFileError
- type Saver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveToDataFolder ¶
func SaveToDataFolder(saver Saver, filename string, dataFolder DataFolder) error
Types ¶
type DataFolder ¶
type DataFolder interface { // OpenReadonlyFile should return NoSuchFileError if it cannot find desired file OpenReadonlyFile(filename string) (io.ReadCloser, error) OpenWriteOnlyFile(filename string) (io.WriteCloser, error) CleanFolder() error FileExists(filename string) bool DeleteFile(filename string) error CreateFile(filename string) error }
type DiskDataFolder ¶
type DiskDataFolder struct {
Path string
}
func NewDiskDataFolder ¶
func NewDiskDataFolder(folderPath string) (*DiskDataFolder, error)
func (*DiskDataFolder) CleanFolder ¶
func (folder *DiskDataFolder) CleanFolder() error
func (*DiskDataFolder) CreateFile ¶
func (folder *DiskDataFolder) CreateFile(filename string) error
func (*DiskDataFolder) DeleteFile ¶
func (folder *DiskDataFolder) DeleteFile(filename string) error
func (*DiskDataFolder) FileExists ¶
func (folder *DiskDataFolder) FileExists(filename string) bool
func (*DiskDataFolder) OpenReadonlyFile ¶
func (folder *DiskDataFolder) OpenReadonlyFile(filename string) (io.ReadCloser, error)
func (*DiskDataFolder) OpenWriteOnlyFile ¶
func (folder *DiskDataFolder) OpenWriteOnlyFile(filename string) (io.WriteCloser, error)
type FileSystemCleaner ¶
type FileSystemCleaner struct{}
FileSystemCleaner actually performs it's functions on file system
type NoSuchFileError ¶
type NoSuchFileError struct {
// contains filtered or unexported fields
}
func NewNoSuchFileError ¶
func NewNoSuchFileError(filename string) NoSuchFileError
func (NoSuchFileError) Error ¶
func (err NoSuchFileError) Error() string
Click to show internal directories.
Click to hide internal directories.