Documentation ¶
Index ¶
- Variables
- func GetFileAbsPath(base, fileName string) (fileAbsPath string, err error)
- type FileManager
- type LocalFileManager
- func (m *LocalFileManager) ArchiveDirectory(fileName string) (file *os.File, err error)
- func (m *LocalFileManager) CreateDirectory(fileName string) (err error)
- func (m *LocalFileManager) CreateFile(fileName string, bytes []byte) (err error)
- func (m *LocalFileManager) FetchFile(fileName string) ([]byte, error)
- func (m *LocalFileManager) FetchFileBytes(fileName string) ([]byte, error)
- func (m *LocalFileManager) FetchFileInfo(fileName string) (os.FileInfo, error)
- func (m *LocalFileManager) GetBase() string
- func (m *LocalFileManager) GetFilesAndDirs(dsirname string) (files []string, dirs []string, err error)
- func (m *LocalFileManager) IsDirectoryExists(fileName string) (bool, error)
- func (m *LocalFileManager) IsFileExists(filePath string) (bool, error)
- func (m *LocalFileManager) SetBase(base string)
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(New, NewOptions)
Functions ¶
func GetFileAbsPath ¶
Types ¶
type FileManager ¶
type FileManager interface { SetBase(base string) GetBase() string CreateFile(fileName string, bytes []byte) error CreateDirectory(fileName string) error FetchFile(fileName string) ([]byte, error) FetchFileInfo(fileName string) (os.FileInfo, error) IsFileExists(fileName string) (bool, error) IsDirectoryExists(fileName string) (bool, error) GetFilesAndDirs(dirname string) ([]string, []string, error) ArchiveDirectory(fileName string) (file *os.File, err error) }
type LocalFileManager ¶
type LocalFileManager struct {
// contains filtered or unexported fields
}
func (*LocalFileManager) ArchiveDirectory ¶
func (m *LocalFileManager) ArchiveDirectory(fileName string) (file *os.File, err error)
func (*LocalFileManager) CreateDirectory ¶
func (m *LocalFileManager) CreateDirectory(fileName string) (err error)
func (*LocalFileManager) CreateFile ¶
func (m *LocalFileManager) CreateFile(fileName string, bytes []byte) (err error)
func (*LocalFileManager) FetchFile ¶
func (m *LocalFileManager) FetchFile(fileName string) ([]byte, error)
func (*LocalFileManager) FetchFileBytes ¶
func (m *LocalFileManager) FetchFileBytes(fileName string) ([]byte, error)
func (*LocalFileManager) FetchFileInfo ¶
func (m *LocalFileManager) FetchFileInfo(fileName string) (os.FileInfo, error)
func (*LocalFileManager) GetBase ¶
func (m *LocalFileManager) GetBase() string
func (*LocalFileManager) GetFilesAndDirs ¶
func (m *LocalFileManager) GetFilesAndDirs(dsirname string) (files []string, dirs []string, err error)
func (*LocalFileManager) IsDirectoryExists ¶
func (m *LocalFileManager) IsDirectoryExists(fileName string) (bool, error)
func (*LocalFileManager) IsFileExists ¶
func (m *LocalFileManager) IsFileExists(filePath string) (bool, error)
func (*LocalFileManager) SetBase ¶
func (m *LocalFileManager) SetBase(base string)
Click to show internal directories.
Click to hide internal directories.