Class PosixStorageFile

java.lang.Object
de.dlr.proseo.storagemgr.posix.PosixStorageFile
All Implemented Interfaces:
StorageFile

public class PosixStorageFile extends Object implements StorageFile
Represents a file within a POSIX-based storage system. It implements the StorageFile interface and provides functionality related to the file's properties and operations. Full path: "/" + basePath + bucket (optional) + relativePath (with fileName)
Author:
Denys Chaykovskiy
  • Constructor Details

    • PosixStorageFile

      public PosixStorageFile(String basePath, String relativePath)
      No Bucket Constructor
      Parameters:
      basePath - base path
      relativePath - relative path
    • PosixStorageFile

      public PosixStorageFile(String basePath, String bucket, String relativePath)
      Constructor with bucket
      Parameters:
      basePath - base path
      bucket - bucket
      relativePath - relative path
    • PosixStorageFile

      public PosixStorageFile(StorageFile storageFile)
      Copy Constructor
      Parameters:
      storageFile - Storage file
  • Method Details

    • getFullPath

      public String getFullPath()
      Gets the full path
      Specified by:
      getFullPath in interface StorageFile
      Returns:
      the full path
    • getBasePath

      public String getBasePath()
      Gets the base path
      Specified by:
      getBasePath in interface StorageFile
      Returns:
      the base path
    • setBasePath

      public void setBasePath(String basePath)
      Sets the base path
      Specified by:
      setBasePath in interface StorageFile
      Parameters:
      basePath - base path
    • getBucket

      public String getBucket()
      Gets the bucket
      Specified by:
      getBucket in interface StorageFile
      Returns:
      the bucket
    • setBucket

      public void setBucket(String bucket)
      Sets the bucket
      Specified by:
      setBucket in interface StorageFile
      Parameters:
      bucket - the bucket
    • getRelativePath

      public String getRelativePath()
      Gets relative path
      Specified by:
      getRelativePath in interface StorageFile
      Returns:
      relative path
    • setRelativePath

      public void setRelativePath(String relativePath)
      Sets relative path
      Specified by:
      setRelativePath in interface StorageFile
      Parameters:
      relativePath - relative path
    • getFileName

      public String getFileName()
      Gets file name
      Specified by:
      getFileName in interface StorageFile
      Returns:
      file name
    • getStorageType

      public StorageType getStorageType()
      Gets storage type
      Specified by:
      getStorageType in interface StorageFile
      Returns:
      storage type
    • getExtension

      public String getExtension()
      Gets extension from file name
      Specified by:
      getExtension in interface StorageFile
      Returns:
      extension
    • isDirectory

      public boolean isDirectory()
      Checks if path is a directory path
      Specified by:
      isDirectory in interface StorageFile
      Returns:
      true if directory