SilverStripe\Assets\FilenameParsing\FileIDHelper
Helps build and parse Filename Identifiers (ake: FileIDs) according to a predefined format.
Synopsis
interface FileIDHelper
{
- // methods
- public string buildFileID()
- public string cleanFilename()
- public ParsedFileID|null parseFileID()
- public boolean isVariantOf()
- public string lookForVariantIn()
- public bool lookForVariantRecursive()
Methods
public
- buildFileID() — Map file tuple (hash, name, variant) to a filename to be used by flysystem
- cleanFilename() — Clean up filename to remove constructs that might clash with the underlying path format of this FileIDHelper.
- isVariantOf() — Determine if the provided fileID is a variant of `$parsedFileID`.
- lookForVariantIn() — Compute the relative path where variants of the provided parsed file ID are expected to be stored.
- lookForVariantRecursive() — Specify if this File ID Helper stores variants in subfolders and require a recursive look up to find all variants.
- parseFileID() — Get Filename, Variant and Hash from a fileID. If a FileID can not be parsed, returns `null`.