Interface FileEntry

All Known Implementing Classes:
CpmFileEntry, DosFileEntry, GutenbergFileEntry, NakedosFileEntry, PascalFileEntry, ProdosDirectoryEntry, ProdosFileEntry, RdosFileEntry

public interface FileEntry
Represents a file entry on disk - not the data.

Date created: Oct 4, 2002 4:46:42 PM

  • Method Details

    • getFilename

      String getFilename()
      Return the name of this file.
    • setFilename

      void setFilename(String filename)
      Set the name of this file.
    • getFiletype

      String getFiletype()
      Return the filetype of this file. This will be OS specific.
    • setFiletype

      void setFiletype(String filetype)
      Set the filetype.
    • isLocked

      boolean isLocked()
      Identify if this file is locked.
    • setLocked

      void setLocked(boolean lock)
      Set the lock indicator.
    • getSize

      int getSize()
      Compute the size of this file (in bytes).
    • isDirectory

      boolean isDirectory()
      Identify if this is a directory file.
    • isDeleted

      boolean isDeleted()
      Identify if this file has been deleted.
    • delete

      void delete()
      Delete the file.
    • getFileColumnData

      List<String> getFileColumnData(int displayMode)
      Get the standard file column header information. This default implementation is intended only for standard mode. displayMode is specified in FormattedDisk.
    • getFileData

      byte[] getFileData()
      Get file data. This handles any operating-system specific issues. Specifically, DOS 3.3 places address and length into binary files and length into Applesoft files.
    • setFileData

      void setFileData(byte[] data) throws DiskFullException
      Set file data. This, essentially, is saving data to disk using this file entry.
      Throws:
      DiskFullException
    • getSuggestedFilter

      FileFilter getSuggestedFilter()
      Get the suggested FileFilter. This appears to be operating system specific, so each operating system needs to implement some manner of guessing the appropriate filter.
    • getFormattedDisk

      FormattedDisk getFormattedDisk()
      Get the FormattedDisk associated with this FileEntry. This is useful to interfaces that need to retrieve the associated disk.
    • getMaximumFilenameLength

      int getMaximumFilenameLength()
      Return the maximum filename length.
    • needsAddress

      boolean needsAddress()
      Indicates if this filetype requires an address component. Note that the FormattedDisk also has this method - normally, this will defer to the method on FormattedDisk, as it will be more generic.
    • setAddress

      void setAddress(int address)
      Set the address that this file loads at.
    • getAddress

      int getAddress()
      Get the address that this file loads at.