FileSystem#
- public class FileSystem#
Fields#
base32Pattern#
Methods#
assertDir#
- public static final String assertDir(String sessionString)#
Asserts that a temporary directory for this session exists, creating it if necessary.
- Parameters:
sessionString – The session string for which the directory is guaranteed to exist after calling this function. If session is Null, a random directory will be created.
- Returns:
A String with the existing directory.
checkTarget#
- public static boolean checkTarget(EntityInterface entity, Access access, TransactionBenchmark b)#
Checks if a target path is consistent with the server’s configuration and the file system.
- Parameters:
entity
- Throws:
Message–
getBasepath#
getDropOffBox#
getFromFileSystem#
getPath#
- public static String getPath(String location)#
Return the canonical path on the native file system of the server’s host which is guaranteed to be a valid path under the server’s internal file system.
- Parameters:
location
- Throws:
Message– TARGET_PATH_NOT_ALLOWED if location does not belong to the file system.
- Returns:
A canonical path.
getTmp#
init#
- public static void init()#
pickUp#
- public static final FileProperties pickUp(String path, String session)#
Pick up file from DropOffBox and load it into tmp dir.
- Parameters:
path
session
- Throws:
- Returns:
A FileProperties Object which represents the object in the tmp dir.
upload#
- public static final FileProperties upload(FileItemStream item, String session)#
Reads a FileItemStream and stores the file into the tmpfolder. Generates FileProperties.
- Parameters:
item
session
- Throws:
- Returns:
FileProperties of the uploaded File.