Documentation
¶
Index ¶
- type ArchiveEntry
- type FileInfo
- type Manager
- func (m *Manager) Chmod(deploymentName, relativePath string, mode os.FileMode) error
- func (m *Manager) Copy(deploymentName, sourcePath, destinationPath string) error
- func (m *Manager) CreateDirectory(deploymentName, relativePath string) error
- func (m *Manager) CreateFile(deploymentName, relativePath string) error
- func (m *Manager) DeleteFile(deploymentName, relativePath string) error
- func (m *Manager) ExtractArchive(deploymentName, sourcePath, destinationPath string) error
- func (m *Manager) GetDiskUsage(deploymentName string) (int64, error)
- func (m *Manager) GetFileInfo(deploymentName, relativePath string) (*FileInfo, error)
- func (m *Manager) GetMountPath(deploymentName, relativePath string) (string, error)
- func (m *Manager) ListArchive(deploymentName, relativePath string) ([]ArchiveEntry, error)
- func (m *Manager) ListFiles(deploymentName, relativePath string) ([]FileInfo, error)
- func (m *Manager) PushArchive(deploymentName, archivePath, destinationPath string, deleteMissing bool) (int, error)
- func (m *Manager) ReadFile(deploymentName, relativePath string) (io.ReadCloser, *FileInfo, error)
- func (m *Manager) Rename(deploymentName, oldPath, newPath string) error
- func (m *Manager) WriteFile(deploymentName, relativePath string, content io.Reader) error
- type SystemManager
- func (m *SystemManager) Chmod(relativePath string, mode os.FileMode) error
- func (m *SystemManager) Copy(sourcePath, destinationPath string) error
- func (m *SystemManager) CreateDirectory(relativePath string) error
- func (m *SystemManager) CreateFile(relativePath string) error
- func (m *SystemManager) DeleteFile(relativePath string) error
- func (m *SystemManager) ExtractArchive(sourcePath, destinationPath string) error
- func (m *SystemManager) GetDiskUsage(relativePath string) (int64, int64, error)
- func (m *SystemManager) GetFileInfo(relativePath string) (*FileInfo, error)
- func (m *SystemManager) List(relativePath string) ([]FileInfo, error)
- func (m *SystemManager) ListArchive(relativePath string) ([]ArchiveEntry, error)
- func (m *SystemManager) Move(sourcePath, destinationPath string) error
- func (m *SystemManager) ReadFile(relativePath string) (io.ReadCloser, *FileInfo, error)
- func (m *SystemManager) Root() string
- func (m *SystemManager) WriteFile(relativePath string, content io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveEntry ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CreateDirectory ¶
func (*Manager) CreateFile ¶ added in v0.2.0
func (*Manager) DeleteFile ¶
func (*Manager) ExtractArchive ¶
func (*Manager) GetFileInfo ¶
func (*Manager) GetMountPath ¶
func (*Manager) ListArchive ¶
func (m *Manager) ListArchive(deploymentName, relativePath string) ([]ArchiveEntry, error)
func (*Manager) PushArchive ¶
type SystemManager ¶ added in v0.2.0
type SystemManager struct {
// contains filtered or unexported fields
}
SystemManager provides filesystem access scoped to a configurable root path. Unlike Manager, it does not require a deployment name; operations are taken against paths relative to the root.
func NewSystemManager ¶ added in v0.2.0
func NewSystemManager(rootPath string) *SystemManager
NewSystemManager constructs a SystemManager rooted at rootPath. If rootPath is empty or invalid it defaults to "/" and a warning is logged: operations against the root filesystem are very permissive and should be gated by an admin-only permission.
func (*SystemManager) Chmod ¶ added in v0.2.0
func (m *SystemManager) Chmod(relativePath string, mode os.FileMode) error
func (*SystemManager) Copy ¶
func (m *SystemManager) Copy(sourcePath, destinationPath string) error
func (*SystemManager) CreateDirectory ¶ added in v0.2.0
func (m *SystemManager) CreateDirectory(relativePath string) error
func (*SystemManager) CreateFile ¶ added in v0.2.0
func (m *SystemManager) CreateFile(relativePath string) error
func (*SystemManager) DeleteFile ¶ added in v0.2.0
func (m *SystemManager) DeleteFile(relativePath string) error
func (*SystemManager) ExtractArchive ¶
func (m *SystemManager) ExtractArchive(sourcePath, destinationPath string) error
func (*SystemManager) GetDiskUsage ¶ added in v0.2.0
func (m *SystemManager) GetDiskUsage(relativePath string) (int64, int64, error)
GetDiskUsage returns the total byte size of regular files under relativePath. The walk only traverses paths that resolve inside the root. Callers should be aware that walking the entire root (e.g. "/") can be very slow.
func (*SystemManager) GetFileInfo ¶ added in v0.2.0
func (m *SystemManager) GetFileInfo(relativePath string) (*FileInfo, error)
func (*SystemManager) List ¶ added in v0.2.0
func (m *SystemManager) List(relativePath string) ([]FileInfo, error)
func (*SystemManager) ListArchive ¶
func (m *SystemManager) ListArchive(relativePath string) ([]ArchiveEntry, error)
func (*SystemManager) Move ¶
func (m *SystemManager) Move(sourcePath, destinationPath string) error
func (*SystemManager) ReadFile ¶ added in v0.2.0
func (m *SystemManager) ReadFile(relativePath string) (io.ReadCloser, *FileInfo, error)
func (*SystemManager) Root ¶ added in v0.2.0
func (m *SystemManager) Root() string
Root returns the configured root path.