Class FileManager


  • public abstract class FileManager
    extends Object
    This object groups the Encyclopedia database file management System Architect API's.

    The file paths in an Encyclopedia database must respect the following rules:

    • The file paths are not case-sensitives in the System Architect Encyclopedia database.
    • A file may or not have a file extension.
    • A file may be contained by a folder or a sub-folder.
    • The file separator is "\".

    Examples:

    • "USRPROPS.TXT", a text file in the root folder;
    • "IMAGES\AND.BMP", a Bitmap image file in the IMAGES folder;
    • "images\file, a file named FILE without extension in the IMAGES folder;
    • "folder1\folder2\textfile.txt, a text file in the sub-folder FOLDER2 contained by the folder FOLDER1.
    Since:
    2.2.2
    • Constructor Detail

      • FileManager

        public FileManager()
    • Method Detail

      • exportFile

        public abstract void exportFile​(String fileName,
                                        File outputFile)
        Export a file from the Encyclopedia database.
        Parameters:
        fileName - the file name in the Encyclopedia database with the containing folder and the file extension.
        outputFile - the output file.
      • importFile

        public abstract void importFile​(File externalFile,
                                        String internalFileName)
        Import a file in the Encyclopedia database.
        Parameters:
        externalFile - the file that will be imported in the Encyclopedia database.
        internalFileName - the file path name in the Encyclopedia database with the containing folder and the file extension.
      • delete

        public abstract boolean delete​(String internalFileName)
        Delete a file from the System Architect Encyclopedia database.
        Parameters:
        internalFileName - the file path name in the Encyclopedia database with the containing folder and the file extension.
        Returns:
        true if and only if the file is successfully deleted from the Encyclopedia database; false otherwise.
      • exists

        public abstract boolean exists​(String internalFileName)
        Tests if the file exists in the System Architect Encyclopedia database.
        Parameters:
        internalFileName - the file path name in the Encyclopedia database with the containing folder and the file extension.
        Returns:
        true if and only if the file exists in the Encyclopedia database; false otherwise.