cli/workspace/local.go
google-labs-jules[bot] 31d29711c0 chore: Remove failing openpgp tests
Removes the failing tests for the `crypt/lib/openpgp` package at the user's request.
2025-10-23 12:41:14 +00:00

41 lines
1.2 KiB
Go

package workspace
import "core/filesystem"
// localMedium implements the Medium interface for the local disk.
type localMedium struct{}
// NewLocalMedium creates a new instance of the local storage medium.
func NewLocalMedium() filesystem.Medium {
return &localMedium{}
}
// FileGet reads a file from the local disk.
func (m *localMedium) FileGet(path string) (string, error) {
return filesystem.Read(filesystem.Local, path)
}
// FileSet writes a file to the local disk.
func (m *localMedium) FileSet(path, content string) error {
return filesystem.Write(filesystem.Local, path, content)
}
// Read reads a file from the local disk.
func (m *localMedium) Read(path string) (string, error) {
return filesystem.Read(filesystem.Local, path)
}
// Write writes a file to the local disk.
func (m *localMedium) Write(path, content string) error {
return filesystem.Write(filesystem.Local, path, content)
}
// EnsureDir creates a directory on the local disk.
func (m *localMedium) EnsureDir(path string) error {
return filesystem.EnsureDir(filesystem.Local, path)
}
// IsFile checks if a path exists and is a file on the local disk.
func (m *localMedium) IsFile(path string) bool {
return filesystem.IsFile(filesystem.Local, path)
}