Class LocalFileName

java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileName
org.apache.commons.vfs2.provider.local.LocalFileName
All Implemented Interfaces:
Comparable<FileName>, FileName
Direct Known Subclasses:
WindowsFileName

public class LocalFileName extends AbstractFileName
A local file URI.
  • Field Details

    • rootFile

      private final String rootFile
  • Constructor Details

  • Method Details

    • appendRootUri

      protected void appendRootUri(StringBuilder buffer, boolean addPassword)
      Builds the root URI for this file name.
      Specified by:
      appendRootUri in class AbstractFileName
      Parameters:
      buffer - A StringBuilder to use to construct the URI.
      addPassword - true if the password should be added, false otherwise.
    • createName

      public FileName createName(String path, FileType type)
      Factory method for creating name instances.
      Specified by:
      createName in class AbstractFileName
      Parameters:
      path - The file path.
      type - The file type.
      Returns:
      The FileName.
    • getRootFile

      public String getRootFile()
      Returns the root file for this file.
      Returns:
      The root file name.
    • toString

      public String toString()
      Returns the decoded URI of the file.
      Overrides:
      toString in class AbstractFileName
      Returns:
      the FileName as a URI.