File
class File (View source)
Service class for the File entity
Methods
static string|false
getRelativePathFromID(int $fID)
Return the relative path for a file (may not exist).
static Version
add(string $filename, string $prefix, array $data = [], StorageLocation|false $fsl = false, FileFolder|false $folder = false)
Create and persist a File entity and a File\Version entity (the filesystem file must already have been imported).
Details
static File|null
getByID(int $fID)
Return a file object for the given file ID.
static File|null
getByUUID(int $fUUID)
Return a file object for the given file UUID.
static string|false
getRelativePathFromID(int $fID)
Return the relative path for a file (may not exist).
static Version
add(string $filename, string $prefix, array $data = [], StorageLocation|false $fsl = false, FileFolder|false $folder = false)
Create and persist a File entity and a File\Version entity (the filesystem file must already have been imported).