Documentation ¶
Overview ¶
Package service package
Index ¶
- type FileSystem
- func (fs *FileSystem) ChangePermission(path string, permisson os.FileMode)
- func (fs *FileSystem) ClearDir(dir string) error
- func (fs *FileSystem) DeleteDir(dir string) error
- func (fs *FileSystem) DeleteFile(path string) error
- func (fs *FileSystem) DirExists(path string) bool
- func (fs *FileSystem) EnsureDir(dirName string, mode int) error
- func (fs *FileSystem) EnsureTrailingSlash(dir string) string
- func (fs *FileSystem) FileExists(path string) bool
- func (fs *FileSystem) GetDirectoryFileNames(path string) ([]string, error)
- func (fs *FileSystem) GetSubDirectoriesNames(path string) ([]string, error)
- func (fs *FileSystem) PathExists(path string) bool
- func (fs *FileSystem) ReadFile(path string) (string, error)
- func (fs *FileSystem) RemoveStartingSlash(dir string) string
- func (fs *FileSystem) RemoveTrailingSlash(dir string) string
- func (fs *FileSystem) Rename(old, new string) error
- func (fs *FileSystem) StoreFile(path, content string) error
- type Installer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem struct { }
FileSystem struct
func (*FileSystem) ChangePermission ¶
func (fs *FileSystem) ChangePermission(path string, permisson os.FileMode)
ChangePermission changes the file permission
func (*FileSystem) ClearDir ¶
func (fs *FileSystem) ClearDir(dir string) error
ClearDir removes all files and sub dirs
func (*FileSystem) DeleteDir ¶
func (fs *FileSystem) DeleteDir(dir string) error
DeleteDir deletes a dir
func (*FileSystem) DeleteFile ¶
func (fs *FileSystem) DeleteFile(path string) error
DeleteFile deletes a file
func (*FileSystem) DirExists ¶
func (fs *FileSystem) DirExists(path string) bool
DirExists reports whether the dir exists
func (*FileSystem) EnsureDir ¶
func (fs *FileSystem) EnsureDir(dirName string, mode int) error
EnsureDir ensures that directory exists
func (*FileSystem) EnsureTrailingSlash ¶
func (fs *FileSystem) EnsureTrailingSlash(dir string) string
EnsureTrailingSlash ensure there is a trailing slash
func (*FileSystem) FileExists ¶
func (fs *FileSystem) FileExists(path string) bool
FileExists reports whether the named file exists
func (*FileSystem) GetDirectoryFileNames ¶
func (fs *FileSystem) GetDirectoryFileNames(path string) ([]string, error)
GetDirectoryFileNames get a list of files inside a directory
func (*FileSystem) GetSubDirectoriesNames ¶
func (fs *FileSystem) GetSubDirectoriesNames(path string) ([]string, error)
GetSubDirectoriesNames gets a list of sub directories
func (*FileSystem) PathExists ¶
func (fs *FileSystem) PathExists(path string) bool
PathExists reports whether the path exists
func (*FileSystem) ReadFile ¶
func (fs *FileSystem) ReadFile(path string) (string, error)
ReadFile get the file content
func (*FileSystem) RemoveStartingSlash ¶
func (fs *FileSystem) RemoveStartingSlash(dir string) string
RemoveStartingSlash removes any starting slash
func (*FileSystem) RemoveTrailingSlash ¶
func (fs *FileSystem) RemoveTrailingSlash(dir string) string
RemoveTrailingSlash removes any trailing slash
func (*FileSystem) Rename ¶
func (fs *FileSystem) Rename(old, new string) error
Rename rename a dir or a file
func (*FileSystem) StoreFile ¶
func (fs *FileSystem) StoreFile(path, content string) error
StoreFile stores a file content
type Installer ¶
type Installer struct { }
Installer struct
func (*Installer) DownloadFromURL ¶
DownloadFromURL downloads from a URL