SilverStripe\Assets\Storage\FileHashingService
Utility for computing and comparing unique file hash. All `$fs` parameters can either be: * an `AssetStore` constant VISIBILITY constant or * an actual `Filesystem` object.
Synopsis
interface FileHashingService
{
- // methods
- public string computeFromStream()
- public string computeFromFile()
- public bool compare()
- public bool isCached()
- public void enableCache()
- public void disableCache()
- public void invalidate()
- public false|string get()
- public void set()
- public void move()
Methods
public
- compare() — Compare 2 full or partial hashes.
- computeFromFile() — Compute the hash of the provided file
- computeFromStream() — Compute the Hash value of the provided stream.
- disableCache() — Disable caching of computed hash.
- enableCache() — Enable caching of computed hash.
- get() — Determined if we have an hash for the provided key and return the hash if present
- invalidate() — Invlaidate the cache for a specific key.
- isCached() — Whatever computed values should be cached
- move() — Move the specified hash value to a different cached key.
- set() — Explicitely set the cached hash for the provided key.