Extend PublishedStorage interface for Acquire-By-Hash

Signed-off-by: André Roth <neolynx@gmail.com>
This commit is contained in:
André Roth
2017-04-17 23:03:43 +02:00
committed by Oliver Sauder
parent bb2db7e500
commit e07912770e
5 changed files with 113 additions and 19 deletions

View File

@@ -264,3 +264,27 @@ func (storage *PublishedStorage) RenameFile(oldName, newName string) error {
return nil
}
// SymLink creates a symbolic link, which can be read with ReadLink
func (storage *PublishedStorage) SymLink(src string, dst string) error {
// TODO: create a file containing dst
return fmt.Errorf("SWIFT: symlinks not implemented")
}
// HardLink creates a hardlink of a file
func (storage *PublishedStorage) HardLink(src string, dst string) error {
// TODO: create a copy of the file
return fmt.Errorf("SWIFT: hardlinks not implemented")
}
// FileExists returns true if path exists
func (storage *PublishedStorage) FileExists(path string) bool {
// TODO: implement
return false
}
// ReadLink returns the symbolic link pointed to by path
func (storage *PublishedStorage) ReadLink(path string) (string, error) {
// TODO: read the path and return the content of the file
return "", fmt.Errorf("SWIFT: ReadLink not implemented")
}