Class AbstractFileStorageEngine<SC extends AbstractFileStorageConfiguration>

    • Method Detail

      • getDirectory

        protected String getDirectory()
        Returns the location of the directory from the configuration or the temporary directory if not defined.
        Returns:
      • getRootPath

        protected Path getRootPath​(String storageName)
        Returns the root path of the storage.
        Parameters:
        storageName -
        Returns:
      • deleteIfExistsRecursively

        protected boolean deleteIfExistsRecursively​(Path path)
                                             throws IOException
        Deletes the file or directory recursively if it exists.
        Parameters:
        path -
        Returns:
        Throws:
        IOException
      • deleteDirectory

        protected boolean deleteDirectory​(Path path,
                                          boolean cleanParent)
                                   throws IOException
        Deletes a directory and optionally removes the parent directory if it becomes empty.
        Parameters:
        path -
        cleanParent -
        Returns:
        Throws:
        IOException
      • moveDirectory

        protected boolean moveDirectory​(Path src,
                                        Path target)
                                 throws IOException
        Moves a directory in the target location.
        Parameters:
        src -
        target -
        Returns:
        Throws:
        IOException
      • createDirectoryIfNotExists

        protected boolean createDirectoryIfNotExists​(Path path)
                                              throws IOException
        Creates the directory in the target location if it does not exist.
        Parameters:
        path -
        Returns:
        Throws:
        IOException