Interface BBjAdminFile

All Superinterfaces:
BBjAdminPropertyReader, BBjAdminPropertyWriter, Remote

public interface BBjAdminFile extends BBjAdminPropertyWriter
A BBjAdminFile represents a file or directory on the file system of the machine running BBj Services. This does not support using Data Server syntax for accessing files. This class is strictly for accessing and listing files at the operating system level.
  • Field Details

  • Method Details

    • listFiles

      BBjAdminList<BBjAdminFile> listFiles(boolean p_sortDirectoriesFirst) throws BBjAdminException
      Returns a list of the files in the directory if this is a directory or null if it is a file.
      Parameters:
      p_sortDirectoriesFirst - True if the directories should be sorted at the beginning of the list. If false, the directories and files will be mixed together, sorted alphabetically (case insensitive).
      Returns:
      List of files contained in this directory.
      Throws:
      BBjAdminException
    • exists

      boolean exists() throws BBjAdminException
      Returns true if the file exists, or false otherwise.
      Returns:
      True if the file exists or false if it does not exist.
      Throws:
      BBjAdminException
    • getContents

      byte[] getContents() throws BBjAdminException
      Returns the contents of the entire file as a byte[].
      Returns:
      The contents of the entire file as a byte array.
      Throws:
      BBjAdminException
    • getParent

      BBjAdminFile getParent() throws BBjAdminException
      Returns the parent directory of this file or directory.
      Returns:
      The parent directory for this file or directory.
      Throws:
      BBjAdminException
    • delete

      void delete() throws BBjAdminException
      Delete the file described by this object.
      Throws:
      BBjAdminException
    • mkdirs

      boolean mkdirs() throws BBjAdminException
      Creates the directory described by this object, as well as any parent directories.
      Returns:
      True if the directory and all parent directories were successfully created, false otherwise.
      Throws:
      BBjAdminException
    • getBBjFileInfo

      BBjAdminBBjFileInfo getBBjFileInfo(boolean p_includeDirectoryDetails, boolean p_recursiveDirectorySize) throws BBjAdminException
      If the file is a BBj file (MKEYED, XKEYED, program file, etc.) this will contain the BBj-specific details about the file.
      Returns:
      BBj-specific details about the file.
      Throws:
      BBjAdminException
    • rename

      void rename(String p_newName) throws BBjAdminException
      Change the name of the file.
      Parameters:
      p_newName - New name for the file.
      Throws:
      BBjAdminException
    • getTotalSize

      long getTotalSize(boolean p_includeSubdirectories) throws BBjAdminException
      Returns the total bytes used by files under this file instance and optionally including all subdirectories. If this is not a directory, it will simply return the size of this file.
      Parameters:
      p_includeSubdirectories - Include subdirectories in the calculation.
      Returns:
      Total bytes used by files under this file instance or the size of this file.
      Throws:
      BBjAdminException