Documentation ¶
Index ¶
- type FileStorage
- func (fs *FileStorage) Abs(path string) (string, error)
- func (fs *FileStorage) Canonical(path string) string
- func (fs *FileStorage) DirExists(path string) (bool, error)
- func (fs *FileStorage) FileExists(path string) (bool, error)
- func (fs *FileStorage) IsDescendantOf(dir string, path string) (bool, error)
- func (fs *FileStorage) Read(path string) ([]byte, error)
- func (fs *FileStorage) Rel(path string) (string, error)
- func (fs *FileStorage) SetWorkingDir(path string)
- func (fs *FileStorage) WorkingDir() string
- func (fs *FileStorage) Write(path string, content []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
FileStorage implements the port core.FileStorage.
func NewFileStorage ¶
func NewFileStorage(workingDir string) (*FileStorage, error)
NewFileStorage creates a new instance of FileStorage using the given working directory as reference point for relative paths.
func (*FileStorage) Canonical ¶
func (fs *FileStorage) Canonical(path string) string
func (*FileStorage) FileExists ¶
func (fs *FileStorage) FileExists(path string) (bool, error)
func (*FileStorage) IsDescendantOf ¶
func (fs *FileStorage) IsDescendantOf(dir string, path string) (bool, error)
func (*FileStorage) SetWorkingDir ¶
func (fs *FileStorage) SetWorkingDir(path string)
func (*FileStorage) WorkingDir ¶
func (fs *FileStorage) WorkingDir() string
Click to show internal directories.
Click to hide internal directories.