Documentation
¶
Index ¶
- Constants
- Variables
- func AccessCommand(paranoidDirectory, filePath string, mode uint32) (returnCode returncodes.Code, returnError error)
- func ChmodCommand(paranoidDirectory, filePath string, perms os.FileMode) (returnCode returncodes.Code, returnError error)
- func CreatCommand(paranoidDirectory, filePath string, perms os.FileMode) (returnCode returncodes.Code, returnError error)
- func GetFileSystemLock(paranoidDir string, lockType int) error
- func InitCommand(directory string) (returnCode returncodes.Code, returnError error)
- func LinkCommand(paranoidDirectory, existingFilePath, targetFilePath string) (returnCode returncodes.Code, returnError error)
- func MkdirCommand(paranoidDirectory, dirPath string, mode os.FileMode) (returnCode returncodes.Code, returnError error)
- func MountCommand(paranoidDirectory, ip, port, mountPoint string) (returnCode returncodes.Code, returnError error)
- func ReadCommand(paranoidDirectory, filePath string, offset, length int64) (returnCode returncodes.Code, returnError error, fileContents []byte)
- func ReadDirCommand(paranoidDirectory, dirPath string) (returnCode returncodes.Code, returnError error, fileNames []string)
- func ReadlinkCommand(paranoidDirectory, filePath string) (returnCode returncodes.Code, returnError error, linkContents string)
- func RenameCommand(paranoidDirectory, oldFilePath, newFilePath string) (returnCode returncodes.Code, returnError error)
- func RmdirCommand(paranoidDirectory, dirPath string) (returnCode returncodes.Code, returnError error)
- func StatCommand(paranoidDirectory, filePath string) (returnCode returncodes.Code, returnError error, info statInfo)
- func SymlinkCommand(paranoidDirectory, existingFilePath, targetFilePath string) (returnCode returncodes.Code, returnError error)
- func TruncateCommand(paranoidDirectory, filePath string, length int64) (returnCode returncodes.Code, returnError error)
- func UnLockFileSystem(paranoidDir string) error
- func UnlinkCommand(paranoidDirectory, filePath string) (returnCode returncodes.Code, returnError error)
- func UtimesCommand(paranoidDirectory, filePath string, atime, mtime *time.Time) (returnCode returncodes.Code, returnError error)
- func WriteCommand(paranoidDirectory, filePath string, offset, length int64, data []byte) (returnCode returncodes.Code, returnError error, bytesWrote int)
Constants ¶
const ( ExclusiveLock )
Types of locks
const PERM_MASK = 0777
Variables ¶
var Log *logger.ParanoidLogger
Functions ¶
func AccessCommand ¶
func AccessCommand(paranoidDirectory, filePath string, mode uint32) (returnCode returncodes.Code, returnError error)
AccessCommand is used by fuse to check if it has access to a given file.
func ChmodCommand ¶
func ChmodCommand(paranoidDirectory, filePath string, perms os.FileMode) (returnCode returncodes.Code, returnError error)
ChmodCommand is used to change the permissions of a file.
func CreatCommand ¶
func CreatCommand(paranoidDirectory, filePath string, perms os.FileMode) (returnCode returncodes.Code, returnError error)
CreatCommand creates a new file with the name filePath in the pfs paranoidDirectory
func GetFileSystemLock ¶
func InitCommand ¶
func InitCommand(directory string) (returnCode returncodes.Code, returnError error)
InitCommand creates the pvd directory sturucture It also gets a UUID and stores it in the meta directory.
func LinkCommand ¶
func LinkCommand(paranoidDirectory, existingFilePath, targetFilePath string) (returnCode returncodes.Code, returnError error)
LinkCommand creates a link of a file.
func MkdirCommand ¶
func MkdirCommand(paranoidDirectory, dirPath string, mode os.FileMode) (returnCode returncodes.Code, returnError error)
MkdirCommand is called when making a paranoidDirectory
func MountCommand ¶
func MountCommand(paranoidDirectory, ip, port, mountPoint string) (returnCode returncodes.Code, returnError error)
MountCommand is used to notify a pfs paranoidDirectory it has been mounted.
func ReadCommand ¶
func ReadCommand(paranoidDirectory, filePath string, offset, length int64) (returnCode returncodes.Code, returnError error, fileContents []byte)
ReadCommand reads data from a file
func ReadDirCommand ¶
func ReadDirCommand(paranoidDirectory, dirPath string) (returnCode returncodes.Code, returnError error, fileNames []string)
ReadDirCommand returns a list of all the files in the given paranoidDirectory
func ReadlinkCommand ¶
func ReadlinkCommand(paranoidDirectory, filePath string) (returnCode returncodes.Code, returnError error, linkContents string)
ReadlinkCommand reads the value of the symbolic link
func RenameCommand ¶
func RenameCommand(paranoidDirectory, oldFilePath, newFilePath string) (returnCode returncodes.Code, returnError error)
RenameCommand is called when renaming a file
func RmdirCommand ¶
func RmdirCommand(paranoidDirectory, dirPath string) (returnCode returncodes.Code, returnError error)
RmdirCommand removes a paranoidDirectory
func StatCommand ¶
func StatCommand(paranoidDirectory, filePath string) (returnCode returncodes.Code, returnError error, info statInfo)
StatCommand returns information about a file as statInfo object
func SymlinkCommand ¶
func SymlinkCommand(paranoidDirectory, existingFilePath, targetFilePath string) (returnCode returncodes.Code, returnError error)
SymlinkCommand creates a symbolic link
func TruncateCommand ¶
func TruncateCommand(paranoidDirectory, filePath string, length int64) (returnCode returncodes.Code, returnError error)
TruncateCommand reduces the file given to the new length
func UnLockFileSystem ¶
func UnlinkCommand ¶
func UnlinkCommand(paranoidDirectory, filePath string) (returnCode returncodes.Code, returnError error)
UnlinkCommand removes a filename link from an inode.
func UtimesCommand ¶
func UtimesCommand(paranoidDirectory, filePath string, atime, mtime *time.Time) (returnCode returncodes.Code, returnError error)
UtimesCommand updates the acess time and modified time of a file
func WriteCommand ¶
func WriteCommand(paranoidDirectory, filePath string, offset, length int64, data []byte) (returnCode returncodes.Code, returnError error, bytesWrote int)
WriteCommand writes data to the given file
Types ¶
This section is empty.