Module jEdit

Class VFSAdapter

java.lang.Object
org.gjt.sp.jedit.io.VFS
de.grogra.ext.jedit.VFSAdapter

public class VFSAdapter extends VFS
  • Constructor Details

    • VFSAdapter

      public VFSAdapter(String name, FileSystem fs, boolean lowLatency)
  • Method Details

    • forAllProjects

      public static VFSAdapter forAllProjects()
    • getParentOfPath

      public String getParentOfPath(String path)
      Description copied from class: VFS
      Returns the parent of the specified path. This must be overridden to return a non-null value for browsing of this filesystem to work.
      Overrides:
      getParentOfPath in class VFS
      Parameters:
      path - The path
    • constructPath

      public String constructPath(String parent, String path)
      Description copied from class: VFS
      Constructs a path from the specified directory and file name component. This must be overridden to return a non-null value, otherwise browsing this filesystem will not work.

      Unless you are writing a VFS, this method should not be called directly. To ensure correct behavior, you must call MiscUtilities.constructPath(String,String) instead.

      Overrides:
      constructPath in class VFS
      Parameters:
      parent - The parent directory
      path - The path
    • getFileSeparator

      public char getFileSeparator()
      Description copied from class: VFS
      Returns the file separator used by this VFS.
      Overrides:
      getFileSeparator in class VFS
    • _listFiles

      public VFSFile[] _listFiles(Object session, String path, Component comp)
      Description copied from class: VFS
      Lists the specified directory.
      Overrides:
      _listFiles in class VFS
      Parameters:
      session - The session
      path - The directory. Note that this must be a full URL, including the host name, path name, and so on. The username and password (if needed by the VFS) is obtained from the session instance.
      comp - The component that will parent error dialog boxes
    • _getFile

      public VFSFile _getFile(Object session, String path, Component comp)
      Description copied from class: VFS
      Returns the specified directory entry.
      Overrides:
      _getFile in class VFS
      Parameters:
      session - The session get it with VFS.createVFSSession(String, Component)
      path - The path
      comp - The component that will parent error dialog boxes
      Returns:
      The specified directory entry, or null if it doesn't exist.
    • _delete

      public boolean _delete(Object session, String path, Component comp)
      Description copied from class: VFS
      Deletes the specified URL.
      Overrides:
      _delete in class VFS
      Parameters:
      session - The VFS session
      path - The path
      comp - The component that will parent error dialog boxes
    • _mkdir

      public boolean _mkdir(Object session, String directory, Component comp)
      Description copied from class: VFS
      Creates a new directory with the specified URL.
      Overrides:
      _mkdir in class VFS
      Parameters:
      session - The VFS session
      directory - The directory
      comp - The component that will parent error dialog boxes
    • _createInputStream

      public InputStream _createInputStream(Object session, String path, boolean ignoreErrors, Component comp) throws IOException
      Description copied from class: VFS
      Creates an input stream. This method is called from the I/O thread.
      Overrides:
      _createInputStream in class VFS
      Parameters:
      session - the VFS session
      path - The path
      ignoreErrors - If true, file not found errors should be ignored
      comp - The component that will parent error dialog boxes
      Returns:
      an inputstream or null if there was a problem
      Throws:
      IOException - If an I/O error occurs
    • _createOutputStream

      public OutputStream _createOutputStream(Object session, String path, Component comp) throws IOException
      Description copied from class: VFS
      Creates an output stream. This method is called from the I/O thread.
      Overrides:
      _createOutputStream in class VFS
      Parameters:
      session - the VFS session
      path - The path
      comp - The component that will parent error dialog boxes
      Throws:
      IOException - If an I/O error occurs
    • getDefaultEncoding

      public String getDefaultEncoding(String path)
      Overrides:
      getDefaultEncoding in class VFS
    • setEncoding

      public void setEncoding(String path, String encoding)
      Overrides:
      setEncoding in class VFS