Class Nfs3File

All Implemented Interfaces:
NfsFile<Nfs3,Nfs3File>, Comparable<Nfs3File>

public class Nfs3File extends NfsFileBase<Nfs3,Nfs3File>
Nfs3 specialization of NfsFile. Almost all functionality is implemented in the parent class.
  • Constructor Details

    • Nfs3File

      public Nfs3File(Nfs3 nfs, String path) throws IOException
      The basic constructor.
      Parameters:
      nfs - The supporting NFS client.
      path - The full path of the file, starting with the mount point.
      Throws:
      IOException
    • Nfs3File

      public Nfs3File(Nfs3 nfs, String path, LinkTracker<Nfs3,Nfs3File> linkTracker) throws IOException
      The basic constructor plus link tracking.
      Parameters:
      nfs - The supporting NFS client.
      path - The full path of the file, starting with the mount point.
      linkTracker - The tracker to use. This must be passed so that monitoring is continued until the link resolves to a file that is not a symbolic link.
      Throws:
      IOException
    • Nfs3File

      public Nfs3File(Nfs3File parent, String child) throws IOException
      The most efficient constructor if the parent file already exists.
      Parameters:
      parent - The parent file, stored to reduce lookup overhead
      child - The short name of the file, starting from the parent path.
      Throws:
      IOException
  • Method Details

    • newChildFile

      public Nfs3File newChildFile(String childName) throws IOException
      Creates a new file with the current file as its parent directory. This does not create the file on the NFS mount.
      Returns:
      the new file
      Throws:
      IOException
    • newFile

      protected Nfs3File newFile(String path, LinkTracker<Nfs3,Nfs3File> linkTracker) throws IOException
      This creates a new file with arbitrary path, using the given LinkTracker.
      Specified by:
      newFile in class NfsFileBase<Nfs3,Nfs3File>
      Parameters:
      path - the absolute path from the mount point.
      linkTracker - The tracker to use. This must be passed so that monitoring is continued until the link resolves to a file that is not a symbolic link.
      Returns:
      A new file corresponding to the path, created using the linkTracker
      Throws:
      IOException