External
class External extends BaseFileFS
An External Andromeda filesystem is accessible outside Andromeda
The filesystem is used "normally" so that the contents can be viewed outside Andromeda. This also means that the filesystem contents are shared between all users, if it is globally accessible. Useful for making existing content accessible through andromeda.
The files and folder on-disk are considered the authoritative record of what exists, and the database is merely a metadata cache.
Properties
| protected | $fsmanager | from FSImpl |
Methods
Updates the given DB folder (and contents) from disk
Reads the exact number of desired bytes from the given file
Helper function to emulate copying a folder by copying its contents manually
Details
in
FSImpl at line 37
int|null
GetChunkSize()
Returns the preferred byte alignment of the filesystem.
Reads and writes should align to these boundaries for performance
in
FSImpl at line 40
protected FSManager
GetFSManager()
Returns a reference to the parent FS manager
in
FSImpl at line 46
protected ObjectDatabase
GetDatabase()
Returns a database reference
at line 54
FSImpl
RefreshFile(File $file)
Updates the given DB file from disk
Checks that it exists, then updates stat metadata
at line 79
FSImpl
RefreshFolder(Folder $folder, bool $doContents = true, FileCreator|null $fileCr = null, FolderCreator|null $folderCr = null)
Updates the given DB folder (and contents) from disk
Checks that it exists, then updates stat metadata. Also scans for new items and creates objects for them.
in
BaseFileFS at line 24
FSImpl
ImportFile(File $file, InputPath $infile)
Creates a new file and imports its content
in
BaseFileFS at line 19
FSImpl
CreateFile(File $file)
Creates an empty file on storage
in
BaseFileFS at line 49
FSImpl
DeleteFile(File $file)
Deletes the given file from storage
in
BaseFileFS at line 29
string
ReadBytes(File $file, int $start, int $length)
Reads the exact number of desired bytes from the given file
Throws an error if the read goes beyond the end of the file
in
BaseFileFS at line 34
FSImpl
WriteBytes(File $file, int $start, string $data)
Writes to the given file, possibly appending it
in
BaseFileFS at line 39
FSImpl
Truncate(File $file, int $length)
Truncates (changes size of) a file
in
BaseFileFS at line 44
FSImpl
CopyFile(File $file, File $dest)
Copies a file
at line 47
protected string
GetFilePath(File $file)
Get the root-relative path of the given file
in
BaseFileFS at line 60
protected BaseFileFS
ManualCopyFolder(Folder $folder, Folder $dest)
Helper function to emulate copying a folder by copying its contents manually
at line 36
protected string
GetItemPath(Item $item, string|null $child = null)
Returns the root-relative path of the given item