Package org.nuxeo.ecm.core.blob
Class PathStrategySubDirs
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.PathStrategy
-
- org.nuxeo.ecm.core.blob.PathStrategySubDirs
-
public class PathStrategySubDirs extends PathStrategy
Stores a file in a nested subdirectory based on the initial characters of the key, in groups of 2. The key is restricted the a safe subset of characters to use as filenames.For instance for a depth of 3 and a key of 1234567890abcd the path will be 12/34/56/1234567890abcd.
- Since:
- 11.1
-
-
Field Summary
Fields Modifier and Type Field Description protected int
depth
-
Fields inherited from class org.nuxeo.ecm.core.blob.PathStrategy
dir, HEX, SAFE
-
-
Constructor Summary
Constructors Constructor Description PathStrategySubDirs(Path dir, int depth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getPathForKey(String key)
Gets the storage path for a given key.-
Methods inherited from class org.nuxeo.ecm.core.blob.PathStrategy
atomicCopy, atomicMove, createTempFile, getKeyForPath, isTempFile, safePath, safePathInverse
-
-
-
-
Constructor Detail
-
PathStrategySubDirs
public PathStrategySubDirs(Path dir, int depth)
-
-
Method Detail
-
getPathForKey
public Path getPathForKey(String key)
Description copied from class:PathStrategy
Gets the storage path for a given key.- Specified by:
getPathForKey
in classPathStrategy
- Parameters:
key
- the key- Returns:
- the file for this key
-
-