Package de.dlr.proseo.storagemgr.posix
Klasse PosixDAL
java.lang.Object
de.dlr.proseo.storagemgr.posix.PosixDAL
A data access layer for interacting with a POSIX-based storage system. It
provides various methods to perform operations such as retrieving files,
checking file or directory existence, obtaining file content, uploading
files, downloading files, and deleting files or directories within the POSIX
storage system.
- Autor:
- Denys Chaykovskiy
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCopies files or directories recursively from the posix file system to another posix file system (normally, to the cache)Copies a file from the POSIX file system to another posix file system (normally, to the cache) locationDeletes file or directory in storagedeleteFile
(String sourceFile) Deletes file in storageDownloads files or directories recursively from the storage systemdownloadFile
(String sourceFile, String targetFileOrDir) Downloads a file from the POSIX storage system to the specified target locationboolean
fileExists
(String path) Checks if file physically existsGets the POSIX configuration used by this PosixDAL instance.getFileContent
(String path) Retrieves the content of a file specified by its pathgetFileName
(String path) Gets file nameRetrieves a list of files that match a given path (or prefix).boolean
isDirectory
(String path) Checks if path is existing directoryboolean
Checks if path is existing fileUploads files or directories recursively to the storage systemuploadFile
(String sourceFile, String targetFileOrDir) Uploads a source file to the POSIX storage system at the specified target location
-
Konstruktordetails
-
PosixDAL
Constructor- Parameter:
cfg
- POSIX Configuration
-
-
Methodendetails
-
getConfiguration
Gets the POSIX configuration used by this PosixDAL instance.- Gibt zurück:
- the PosixConfiguration object
-
getFiles
Retrieves a list of files that match a given path (or prefix). It recursively scans directories and adds the absolute paths of files to the result- Parameter:
path
- path (prefix)- Gibt zurück:
- list if files
-
getFileName
Gets file name- Parameter:
path
- path- Gibt zurück:
- file name
-
fileExists
Checks if file physically exists- Parameter:
path
- path- Gibt zurück:
- true if file exists
-
isDirectory
Checks if path is existing directory- Parameter:
path
- path- Gibt zurück:
- true if path is directory
-
isFile
Checks if path is existing file- Parameter:
path
- path- Gibt zurück:
- true if file exists
-
getFileContent
Retrieves the content of a file specified by its path- Parameter:
path
- the path to the storage file- Gibt zurück:
- file content
- Löst aus:
IOException
- if an I/O exception occurs
-
uploadFile
Uploads a source file to the POSIX storage system at the specified target location- Parameter:
sourceFile
- source file to uploadtargetFileOrDir
- target file or directory in storage- Gibt zurück:
- path of uploaded file
- Löst aus:
IOException
- if file cannot be uploaded
-
upload
Uploads files or directories recursively to the storage system- Parameter:
sourceFileOrDir
- source file or directory to uploadtargetFileOrDir
- target file or directory in storage- Gibt zurück:
- path list of uploaded files
- Löst aus:
IOException
- if files cannot be uploaded
-
downloadFile
Downloads a file from the POSIX storage system to the specified target location- Parameter:
sourceFile
- source file in storage to downloadtargetFileOrDir
- target file or directory- Gibt zurück:
- path of downloaded file
- Löst aus:
IOException
- if file cannot be downloaded
-
download
Downloads files or directories recursively from the storage system- Parameter:
sourceFileOrDir
- source file or directory in storage to downloadtargetFileOrDir
- target file or directory- Gibt zurück:
- path list of downloaded files
- Löst aus:
IOException
- true if file or directory cannot be downloaded
-
copyFile
Copies a file from the POSIX file system to another posix file system (normally, to the cache) location- Parameter:
sourceFile
- posix source filetargetFileOrDir
- posix target file or directory- Gibt zurück:
- path of downloaded file
- Löst aus:
IOException
- if file cannot be downloaded
-
copy
Copies files or directories recursively from the posix file system to another posix file system (normally, to the cache)- Parameter:
sourceFileOrDir
- posix source file or directorytargetFileOrDir
- posix target file or directory- Gibt zurück:
- path list of copied files
- Löst aus:
IOException
- true if file or directory cannot be copied
-
deleteFile
Deletes file in storage- Parameter:
sourceFile
- file to delete in storage- Gibt zurück:
- path of deleted file
- Löst aus:
IOException
- true if file cannot be deleted
-
delete
Deletes file or directory in storage- Parameter:
sourceFileOrDir
- file or directory to delete- Gibt zurück:
- path list of deleted file or directory
- Löst aus:
IOException
- true if file or directory cannot be deleted
-