Interface NfsFile<N extends Nfs<?>, F extends NfsFile<N,F> >
- All Superinterfaces:
Comparable<F>
- All Known Implementing Classes:
Nfs3File, NfsFileBase
java.io.File. It has been modified
appropriately for manipulations of NFS files, as specified by RFC 1813
(https://tools.ietf.org/html/rfc1813).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longExecute permission for group on a file.static final longRead permission for group.static final longWrite permission for group.static final longExecute permission for others on a file.static final longRead permission for others.static final longWrite permission for others.static final longExecute permission for owner on a file.static final longRead permission for owner.static final longWrite permission for owner.static final longSave swapped text (not defined in POSIX).static final StringString between names in the file path.static final charCharacter between names in the file path.static final longSet group ID on execution.static final longSet user ID on execution. -
Method Summary
Modifier and TypeMethodDescriptionaccess(long accessToCheck) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).booleanTests whether this client can delete an existing directory entry.booleanTests whether this client can execute this file (no meaning for a directory).booleanTests whether this client can write new data or add directory entries.booleanTests whether this client can look up a name in a directory (no meaning for non-directory objects).booleanTests whether this client can rewrite existing file data or modify existing directory entries.booleancanRead()Tests whether this client can read data from file or read a directory.commit(long offsetToCommit, int dataSizeToCommit) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).create(NfsCreateMode createMode, NfsSetAttributes attributes, byte[] verifier) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).booleanAtomically creates a new, empty file named by path if and only if a file with this name does not yet exist.voiddelete()Deletes this file/directory.booleanexists()Tests whether this file exists on the NFS server.Resolves symbolic links while tracking link traversal.followLinks(LinkTracker<N, F> linkTracker) Resolves symbolic links while tracking link traversal.fsinfo()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).fsstat()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Returns the fully qualified path to the file in this network, including the server name and the exported folders, using the usual form:server:exported_folders/path_from_exported_filesystem_root.longgetAccess(long accessToCheck) Tests whether this client has the specified access permissions for this file.getattr()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Returns the NFS attributes, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).getChildFile(String childName) Returns the child file.byte[]Returns the NFS file handle, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).longReturns the number of unallocated bytes in the partition named by this abstract path name.longgetMode()Convenience method to access the protection mode bits, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813): 0x00800 - Set user ID on execution.getName()Returns the name.getNfs()Returns the low-level NFS client supporting this NfsFile instance.Returns the path of the parent folder, or null if there is none.Returns the NfsFile of the parent folder, or null if there is none.getPath()Returns the absolute path, from the root of the exported folders.longReturns the size of the partition named by this abstract pathname.longReturns the number of free bytes available to this client on the partition named by this abstract pathname.booleanReturns true if it is, false if it is not.booleanisFile()Returns true if it is a normal file, false if it is not.booleanReturns true if it is the root file of the mount, false if it is not.longReturns time of last modification.longlength()Returns the length in bytes, or 0 if the file does not exist or the attributes cannot be read.longlengthEx()Returns the length in bytes.Makes the RPC call for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).list()Lists all files in this directory.list(NfsFilenameFilter filter) Lists all files matching the filter in this directory.Lists all files in this directory.listFiles(NfsFileFilter filter) Lists all files matching the filter in this directory.listFiles(NfsFilenameFilter filter) Lists all files matching the filter in this directory.lookup()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeAccessRequest(long accessToCheck) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeCommitRequest(long offsetToCommit, int dataSizeToCommit) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeCreateRequest(NfsCreateMode createMode, NfsSetAttributes attributes, byte[] verifier) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeLinkRequest(F source) Convenience method for creating the request for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeMkdirRequest(NfsSetAttributes attributes) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeMknodRequest(NfsType type, NfsSetAttributes attributes, long[] rdev) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeReaddirplusRequest(long cookie, long cookieverf, int dircount, int maxcount) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeReaddirRequest(long cookie, long cookieverf, int count) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeReadRequest(long offset, int size) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeRenameRequest(F toFile) Convenience method for creating the request for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeSetAttrRequest(NfsSetAttributes attributes, NfsTime guardTime) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeSymlinkRequest(String symbolicLinkData, NfsSetAttributes attributes) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).makeWriteRequest(long offset, List<ByteBuffer> payload, int syncType) Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).voidmkdir()Creates the directory if it does not exist.mkdir(NfsSetAttributes attributes) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).voidmkdirs()Creates the directory and all parent directories if they do not already exist.mknod(NfsType type, NfsSetAttributes attributes, long[] rdev) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).newChildFile(String childName) Creates a new file with the current file as its parent directory.pathconf()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).read(long offset, int size, byte[] bytes, int position) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).readdir(long cookie, long cookieverf, int count) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).readdir(long cookie, long cookieverf, int count, List<NfsDirectoryEntry> entries) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).readdirplus(long cookie, long cookieverf, int dircount, int maxcount) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).readdirplus(long cookie, long cookieverf, int dircount, int maxcount, List<NfsDirectoryPlusEntry> entries) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).readlink()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).remove()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Makes the RPC call for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).booleanRenames the file denoted by this abstract pathname.rmdir()Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).setattr(NfsSetAttributes attributes, NfsTime guardTime) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).voidsetAttributes(NfsSetAttributes nfsSetAttributes) Sets NFS file attributes, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).voidsetLastModified(long millis) Sets the last-modified time of the file or directory named by this abstract pathname.voidsetMode(long mode) Sets the protection mode bits, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).symlink(String symbolicLinkData, NfsSetAttributes attributes) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).write(long offset, List<ByteBuffer> payload, int syncType) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).write(long offset, List<ByteBuffer> payload, int syncType, Long verifier) Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Methods inherited from interface Comparable
compareTo
-
Field Details
-
separatorChar
static final char separatorCharCharacter between names in the file path. Equivalent of the File interfaceseparatorChar.- See Also:
-
separator
String between names in the file path. Equivalent of the File interfaceseparator.- See Also:
-
setUserIdOnExecuteModeBit
static final long setUserIdOnExecuteModeBitSet user ID on execution. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
setGroupIdOnExecuteModeBit
static final long setGroupIdOnExecuteModeBitSet group ID on execution. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
saveSwappedTextModeBit
static final long saveSwappedTextModeBitSave swapped text (not defined in POSIX). Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
ownerReadModeBit
static final long ownerReadModeBitRead permission for owner. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
ownerWriteModeBit
static final long ownerWriteModeBitWrite permission for owner. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
ownerExecuteModeBit
static final long ownerExecuteModeBitExecute permission for owner on a file. Or lookup (search) permission for owner in directory. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
groupReadModeBit
static final long groupReadModeBitRead permission for group. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
groupWriteModeBit
static final long groupWriteModeBitWrite permission for group. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
groupExecuteModeBit
static final long groupExecuteModeBitExecute permission for group on a file. Or lookup (search) permission for group in directory. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
othersReadModeBit
static final long othersReadModeBitRead permission for others. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
othersWriteModeBit
static final long othersWriteModeBitWrite permission for others. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
othersExecuteModeBit
static final long othersExecuteModeBitExecute permission for others on a file. Or lookup (search) permission for others in directory. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- See Also:
-
-
Method Details
-
canDelete
Tests whether this client can delete an existing directory entry. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
trueif it can,falseif it cannot- Throws:
IOException- if it does not exist or permissions cannot be read.
-
canExecute
Tests whether this client can execute this file (no meaning for a directory). Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
trueif it can,falseif it cannot- Throws:
IOException- if it does not exist or permissions cannot be read.
-
canExtend
Tests whether this client can write new data or add directory entries. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
trueif it can,falseif it cannot- Throws:
IOException- if it does not exist or permissions cannot be read.
-
canLookup
Tests whether this client can look up a name in a directory (no meaning for non-directory objects). Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
trueif it can,falseif it cannot- Throws:
IOException- if it does not exist or permissions cannot be read.
-
canModify
Tests whether this client can rewrite existing file data or modify existing directory entries. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
trueif it can,falseif it cannot- Throws:
IOException- if it does not exist or permissions cannot be read.
-
canRead
Tests whether this client can read data from file or read a directory. Specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
trueif it can,falseif it cannot- Throws:
IOException- if it does not exist or permissions cannot be read.
-
createNewFile
Atomically creates a new, empty file named by path if and only if a file with this name does not yet exist. The test for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file.- Returns:
trueif the named file did not exist and was successfully created;falseif the named file already existed.- Throws:
IOException- If an I/O error occurred
-
delete
-
exists
Tests whether this file exists on the NFS server.- Returns:
trueif the file exists on the NFS server- Throws:
IOException
-
followLinks
Resolves symbolic links while tracking link traversal.- Returns:
- The backing file obtained by following all symbolic links in the path, if any.
- Throws:
IOException
-
followLinks
Resolves symbolic links while tracking link traversal.- Parameters:
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:
- The backing file obtained by following all symbolic links in the path, if any.
- Throws:
IOException
-
getAbsolutePath
String getAbsolutePath()Returns the fully qualified path to the file in this network, including the server name and the exported folders, using the usual form:server:exported_folders/path_from_exported_filesystem_root. -
getAccess
Tests whether this client has the specified access permissions for this file. The bits for the request and reply are as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813):ACCESS3_READ = 0x0001 - Read data from file or read a directory. ACCESS3_LOOKUP = 0x0002 - Look up a name in a directory (no meaning for non-directory objects). ACCESS3_MODIFY = 0x0004 - Rewrite existing file data or modify existing directory entries. ACCESS3_EXTEND = 0x0008 - Write new data or add directory entries. ACCESS3_DELETE = 0x0010 - Delete an existing directory entry. ACCESS3_EXECUTE = 0x0020 - Execute file (no meaning for a directory).
In general, it is not sufficient for the client to attempt to deduce access permissions by inspecting the uid, gid, and mode fields in the file attributes, since the server may perform uid or gid mapping or enforce additional access control restrictions. It is also possible that the NFS version 3 protocol server may not be in the same ID space as the NFS version 3 protocol client. In these cases (and perhaps others), the NFS version 3 protocol client can not reliably perform an access check with only current file attributes.In the NFS version 2 protocol, the only reliable way to determine whether an operation was allowed was to try it and see if it succeeded or failed. Using the ACCESS procedure in the NFS version 3 protocol, the client can ask the server to indicate whether or not one or more classes of operations are permitted. The ACCESS operation is provided to allow clients to check before doing a series of operations. This is useful in operating systems (such as UNIX) where permission checking is done only when a file or directory is opened. This procedure is also invoked by NFS client access procedure (called possibly through access(2)). The intent is to make the behavior of opening a remote file more consistent with the behavior of opening a local file.
- Parameters:
accessToCheck- A bit mask of access permissions to check, as specified below.ACCESS3_READ = 0x0001 - Read data from file or read a directory. ACCESS3_LOOKUP = 0x0002 - Look up a name in a directory (no meaning for non-directory objects). ACCESS3_MODIFY = 0x0004 - Rewrite existing file data or modify existing directory entries. ACCESS3_EXTEND = 0x0008 - Write new data or add directory entries. ACCESS3_DELETE = 0x0010 - Delete an existing directory entry. ACCESS3_EXECUTE = 0x0020 - Execute file (no meaning for a directory).- Returns:
- The access bitmap, as specified below.
ACCESS3_READ = 0x0001 - Read data from file or read a directory. ACCESS3_LOOKUP = 0x0002 - Look up a name in a directory (no meaning for non-directory objects). ACCESS3_MODIFY = 0x0004 - Rewrite existing file data or modify existing directory entries. ACCESS3_EXTEND = 0x0008 - Write new data or add directory entries. ACCESS3_DELETE = 0x0010 - Delete an existing directory entry. ACCESS3_EXECUTE = 0x0020 - Execute file (no meaning for a directory). - Throws:
IOException- if it does not exist or permissions cannot be read.
-
getAttributes
Returns the NFS attributes, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
- The NFS attributes, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
- Throws:
IOException
-
getChildFile
Returns the child file.- Returns:
- The child file.
- Throws:
IOException
-
getFreeSpace
Returns the number of unallocated bytes in the partition named by this abstract path name.- Returns:
- The number of unallocated bytes in the partition named by this abstract path name.
- Throws:
IOException
-
getMode
Convenience method to access the protection mode bits, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813):- 0x00800 - Set user ID on execution.
- 0x00400 - Set group ID on execution.
- 0x00200 - Save swapped text (not defined in POSIX).
- 0x00100 - Read permission for owner.
- 0x00080 - Write permission for owner.
- 0x00040 - Execute permission for owner on a file. Or lookup (search) permission for owner in directory.
- 0x00020 - Read permission for group.
- 0x00010 - Write permission for group.
- 0x00008 - Execute permission for group on a file. Or lookup (search) permission for group in directory.
- 0x00004 - Read permission for others.
- 0x00002 - Write permission for others.
- 0x00001 - Execute permission for others on a file. Or lookup (search) permission for others in directory.
- Returns:
- The protection mode bits for the file.
- Throws:
IOException
-
getName
String getName()Returns the name. -
getParent
String getParent()Returns the path of the parent folder, or null if there is none. -
getParentFile
F getParentFile()Returns the NfsFile of the parent folder, or null if there is none. -
getPath
String getPath()Returns the absolute path, from the root of the exported folders. Synonymous with getAbsolutePath(). -
getTotalSpace
Returns the size of the partition named by this abstract pathname.- Returns:
- The size of the partition named by this abstract pathname.
- Throws:
IOException
-
getUsableSpace
Returns the number of free bytes available to this client on the partition named by this abstract pathname.- Returns:
- The number of free bytes available to this client on the partition named by this abstract pathname.
- Throws:
IOException
-
isDirectory
Returns true if it is, false if it is not.- Returns:
- true if it is, false if it is not
- Throws:
IOException
-
isFile
Returns true if it is a normal file, false if it is not.- Returns:
- true if it is a normal file, false if it is not
- Throws:
IOException
-
isRootFile
Returns true if it is the root file of the mount, false if it is not.- Returns:
- true if it is the root file of the mount, false if it is not
- Throws:
IOException
-
lastModified
Returns time of last modification.- Returns:
- time of last modification
- Throws:
IOException
-
length
long length()Returns the length in bytes, or 0 if the file does not exist or the attributes cannot be read. -
lengthEx
Returns the length in bytes.- Returns:
- the length in bytes
- Throws:
IOException- if the file does not exist or the attributes cannot be read.
-
list
Lists all files in this directory.Preserves the server's entry order across READDIR responses, excluding
.and... The client does not request sorting or sort the results. NFSv3 does not guarantee alphabetical order or the same order across listings or servers. Sort the complete returned list if a specific order is required. A listing is not a snapshot of a changing directory.- Returns:
- the names of all files in the directory
- Throws:
IOException
-
list
Lists all files matching the filter in this directory.Preserves the relative server order of accepted entries. The ordering and consistency considerations described in
list()apply.- Returns:
- the names of all files matching the filter in the directory
- Throws:
IOException
-
listFiles
Lists all files in this directory.Returns file objects in the order produced by
list(), without sorting. The ordering and consistency considerations described there apply.- Returns:
- NfsFile objects for all files in the directory
- Throws:
IOException
-
listFiles
Lists all files matching the filter in this directory.Preserves the relative server order of accepted entries. The ordering and consistency considerations described in
list()apply.- Returns:
- NfsFile objects for all files matching the filter in the directory
- Throws:
IOException
-
listFiles
Lists all files matching the filter in this directory.Preserves the relative server order of accepted entries. The ordering and consistency considerations described in
list()apply.- Returns:
- NfsFile objects for all files matching the filter in the directory
- Throws:
IOException
-
mkdir
Creates the directory if it does not exist.- Throws:
IOException- if the parent directories do not exist or it cannot be created
-
mkdirs
Creates the directory and all parent directories if they do not already exist.- Throws:
IOException- if it cannot create one of the directories.
-
newChildFile
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
-
renameTo
Renames the file denoted by this abstract pathname.Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful.
- Throws:
IOException
-
setAttributes
Sets NFS file attributes, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Throws:
IOException
-
setLastModified
Sets the last-modified time of the file or directory named by this abstract pathname.All platforms support file-modification times to the nearest second, but some provide more precision. The argument will be truncated to fit the supported precision. If the operation succeeds and no intervening operations on the file take place, then the next invocation of the lastModified() method will return the (possibly truncated) time argument that was passed to this method.
- Parameters:
millis- - The new last-modified time, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)- Throws:
IOException
-
setMode
Sets the protection mode bits, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This replaces thejava.io.FilemethodssetExecutable,setReadable, andsetWritable. The protection mode bits are defined as follows:- 0x00800 - Set user ID on execution.
- 0x00400 - Set group ID on execution.
- 0x00200 - Save swapped text (not defined in POSIX).
- 0x00100 - Read permission for owner.
- 0x00080 - Write permission for owner.
- 0x00040 - Execute permission for owner on a file. Or lookup (search) permission for owner in directory.
- 0x00020 - Read permission for group.
- 0x00010 - Write permission for group.
- 0x00008 - Execute permission for group on a file. Or lookup (search) permission for group in directory.
- 0x00004 - Read permission for others.
- 0x00002 - Write permission for others.
- 0x00001 - Execute permission for others on a file. Or lookup (search) permission for others in directory.
- Parameters:
mode- the protection mode bits- Throws:
IOException
-
getNfs
N getNfs()Returns the low-level NFS client supporting this NfsFile instance. -
getFileHandle
Returns the NFS file handle, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- Returns:
- The NFS file handle, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
- Throws:
IOException
-
getattr
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure GETATTR retrieves the attributes for a specified file system object. The object is identified by the file handle that the server returned as part of the response from a LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD, or READDIRPLUS procedure (or from the MOUNT service, described elsewhere).
- Returns:
- the response
- Throws:
IOException
-
makeGetAttrRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure GETATTR retrieves the attributes for a specified file system object. The object is identified by the file handle that the server returned as part of the response from a LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD, or READDIRPLUS procedure (or from the MOUNT service, described elsewhere).
- Returns:
- the request
- Throws:
IOException
-
setattr
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure SETATTR changes one or more of the attributes of a file system object on the server.
- Parameters:
attributes- The attributes to set.guardTime- IfguardTimeis not null, the server must compare the value ofguardTimeto the current ctime of the object. If the values are different, the server must preserve the object attributes and must return a status of NFS3ERR_NOT_SYNC.- Returns:
- the response
- Throws:
IOException
-
makeSetAttrRequest
NfsSetAttrRequest makeSetAttrRequest(NfsSetAttributes attributes, NfsTime guardTime) throws IOException Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure SETATTR changes one or more of the attributes of a file system object on the server.
- Parameters:
attributes- The attributes to set.guardTime- IfguardTimeis not null, the server must compare the value ofguardTimeto the current ctime of the object. If the values are different, the server must preserve the object attributes and must return a status of NFS3ERR_NOT_SYNC.- Returns:
- the request
- Throws:
IOException
-
lookup
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure LOOKUP searches a directory for a specific name and returns the file handle for the corresponding file system object.
- Returns:
- the response
- Throws:
IOException
-
makeLookupRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure LOOKUP searches a directory for a specific name and returns the file handle for the corresponding file system object.
- Returns:
- the request
- Throws:
IOException
-
access
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure ACCESS determines the access rights that a user, as identified by the credentials in the request, has with respect to a file system object. The client encodes the set of permissions that are to be checked in a bit mask. The server checks the permissions encoded in the bit mask. A status of NFS3_OK is returned along with a bit mask encoded with the permissions that the client is allowed.
The results of this procedure are necessarily advisory in nature. That is, a return status of NFS3_OK and the appropriate bit set in the bit mask does not imply that such access will be allowed to the file system object in the future, as access rights can be revoked by the server at any time.
- Parameters:
accessToCheck- A bit mask of access permissions to check, as specified below.ACCESS3_READ = 0x0001 - Read data from file or read a directory. ACCESS3_LOOKUP = 0x0002 - Look up a name in a directory (no meaning for non-directory objects). ACCESS3_MODIFY = 0x0004 - Rewrite existing file data or modify existing directory entries. ACCESS3_EXTEND = 0x0008 - Write new data or add directory entries. ACCESS3_DELETE = 0x0010 - Delete an existing directory entry. ACCESS3_EXECUTE = 0x0020 - Execute file (no meaning for a directory).- Returns:
- the response
- Throws:
IOException
-
makeAccessRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure ACCESS determines the access rights that a user, as identified by the credentials in the request, has with respect to a file system object. The client encodes the set of permissions that are to be checked in a bit mask. The server checks the permissions encoded in the bit mask. A status of NFS3_OK is returned along with a bit mask encoded with the permissions that the client is allowed.
The results of this procedure are necessarily advisory in nature. That is, a return status of NFS3_OK and the appropriate bit set in the bit mask does not imply that such access will be allowed to the file system object in the future, as access rights can be revoked by the server at any time.
- Parameters:
accessToCheck- A bit mask of access permissions to check, as specified below.ACCESS3_READ = 0x0001 - Read data from file or read a directory. ACCESS3_LOOKUP = 0x0002 - Look up a name in a directory (no meaning for non-directory objects). ACCESS3_MODIFY = 0x0004 - Rewrite existing file data or modify existing directory entries. ACCESS3_EXTEND = 0x0008 - Write new data or add directory entries. ACCESS3_DELETE = 0x0010 - Delete an existing directory entry. ACCESS3_EXECUTE = 0x0020 - Execute file (no meaning for a directory).- Returns:
- the request
- Throws:
IOException
-
readlink
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.This method reads the data associated with a symbolic link. The data is an ASCII string that is opaque to the server. That is, whether created by the NFS version 3 protocol software from a client or created locally on the server, the data in a symbolic link is not interpreted when created, but is simply stored.
A symbolic link is nominally a pointer to another file. The data is not necessarily interpreted by the server, just stored in the file. It is possible for a client implementation to store a path name that is not meaningful to the server operating system in a symbolic link. A READLINK operation returns the data to the client for interpretation. If different implementations want to share access to symbolic links, then they must agree on the interpretation of the data in the symbolic link.
- Returns:
- the response
- Throws:
IOException
-
makeReadlinkRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).This method reads the data associated with a symbolic link. The data is an ASCII string that is opaque to the server. That is, whether created by the NFS version 3 protocol software from a client or created locally on the server, the data in a symbolic link is not interpreted when created, but is simply stored.
A symbolic link is nominally a pointer to another file. The data is not necessarily interpreted by the server, just stored in the file. It is possible for a client implementation to store a path name that is not meaningful to the server operating system in a symbolic link. A READLINK operation returns the data to the client for interpretation. If different implementations want to share access to symbolic links, then they must agree on the interpretation of the data in the symbolic link.
- Returns:
- the request
- Throws:
IOException
-
read
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure READ reads data from a file.
- Parameters:
offset- The position within the file at which the read is to begin. Anoffsetof 0 means to read data starting at the beginning of the file. Ifoffsetis greater than or equal to the size of the file, the status, NFS3_OK, is returned withsizeset to 0 andeofset totrue, subject to access permissions checking.size- The number of bytes of data that are to be read. Ifsizeis 0, the READ will succeed and return 0 bytes of data, subject to access permissions checking.sizemust be less than or equal to the value of thertmaxfield in the FSINFO reply structure for the file system that contains file. If greater, the server may return onlyrtmaxbytes, resulting in a short read.bytes- optional externally provided buffer - if not provided, the method will create a new, empty buffer for receiving the data.position- position to start writing, defaults to 0 if buffer is null- Returns:
- the response
- Throws:
IOException
-
makeReadRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure READ reads data from a file.
- Parameters:
offset- The position within the file at which the read is to begin. Anoffsetof 0 means to read data starting at the beginning of the file. Ifoffsetis greater than or equal to the size of the file, the status, NFS3_OK, is returned withsizeset to 0 andeofset totrue, subject to access permissions checking.size- The number of bytes of data that are to be read. Ifsizeis 0, the READ will succeed and return 0 bytes of data, subject to access permissions checking.sizemust be less than or equal to the value of thertmaxfield in the FSINFO reply structure for the file system that contains file. If greater, the server may return onlyrtmaxbytes, resulting in a short read.- Returns:
- the request
- Throws:
IOException
-
write
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure WRITE writes data to a file.
- Parameters:
offset- The position within the file at which the write is to begin. An offset of 0 means to write data starting at the beginning of the file.payload- The data to be written to the file.syncType- One of the values below.UNSTABLE = 0 - Best effort, no promises. DATA_SYNC = 1 - Commit all data to stable storage, plus enough metadata for retrieval, before returning. FILE_SYNC = 2 - Commit all data and metadata to stable storage before returning.- Returns:
- the response
- Throws:
IOException
-
write
NfsWriteResponse write(long offset, List<ByteBuffer> payload, int syncType, Long verifier) throws IOException Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure WRITE writes data to a file.
- Parameters:
offset- The position within the file at which the write is to begin. An offset of 0 means to write data starting at the beginning of the file.payload- The data to be written to the file.syncType- One of the values below.- UNSTABLE = 0 - Best effort, no promises.
- DATA_SYNC = 1 - Commit all data to stable storage, plus enough metadata for retrieval, before returning.
- FILE_SYNC = 2 - Commit all data and metadata to stable storage before returning.
verifier- This is a cookie, previously returned from the server, that the client can use to determine whether the server has changed state between a call to WRITE and a subsequent call to either WRITE or COMMIT.- Returns:
- the response
- Throws:
IOException
-
makeWriteRequest
NfsWriteRequest makeWriteRequest(long offset, List<ByteBuffer> payload, int syncType) throws IOException Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure WRITE writes data to a file.
- Parameters:
offset- The position within the file at which the write is to begin. An offset of 0 means to write data starting at the beginning of the file.payload- The data to be written to the file.syncType- One of the values below.- UNSTABLE = 0 - Best effort, no promises.
- DATA_SYNC = 1 - Commit all data to stable storage, plus enough metadata for retrieval, before returning.
- FILE_SYNC = 2 - Commit all data and metadata to stable storage before returning.
- Returns:
- the request
- Throws:
IOException
-
create
NfsCreateResponse create(NfsCreateMode createMode, NfsSetAttributes attributes, byte[] verifier) throws IOException Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure CREATE creates a regular file.
- Parameters:
createMode- The instance describing how the file is to be created. UNCHECKED means that the file should be created without checking for the existence of a duplicate file in the same directory. In this case, how.obj_attributes is a sattr3 describing the initial attributes for the file. GUARDED specifies that the server should check for the presence of a duplicate file before performing the create and should fail the request with NFS3ERR_EXIST if a duplicate file exists. If the file does not exist, the request is performed as described for UNCHECKED. EXCLUSIVE specifies that the server is to follow exclusive creation semantics, using the verifier to ensure exclusive creation of the target. No attributes may be provided in this case, since the server may use the target file metadata to store the createverf3 verifier.attributes- The initial attributes for the new file.verifier- A unique identifier to ensure exclusive creation of the new file. If no value is provided for exclusive creation, this is generated.- Returns:
- the response
- Throws:
IOException
-
makeCreateRequest
NfsCreateRequest makeCreateRequest(NfsCreateMode createMode, NfsSetAttributes attributes, byte[] verifier) throws IOException Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure CREATE creates a regular file.
- Parameters:
createMode- The instance describing how the file is to be created. UNCHECKED means that the file should be created without checking for the existence of a duplicate file in the same directory. In this case, how.obj_attributes is a sattr3 describing the initial attributes for the file. GUARDED specifies that the server should check for the presence of a duplicate file before performing the create and should fail the request with NFS3ERR_EXIST if a duplicate file exists. If the file does not exist, the request is performed as described for UNCHECKED. EXCLUSIVE specifies that the server is to follow exclusive creation semantics, using the verifier to ensure exclusive creation of the target. No attributes may be provided in this case, since the server may use the target file metadata to store the createverf3 verifier.attributes- The initial attributes for the new file.verifier- A unique identifier to ensure exclusive creation of the new file. If no value is provided for exclusive creation, this is generated.- Returns:
- the request
- Throws:
IOException
-
mkdir
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure MKDIR creates a new subdirectory.
- Parameters:
attributes- The initial attributes for the subdirectory.- Returns:
- the response
- Throws:
IOException
-
makeMkdirRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure MKDIR creates a new subdirectory.
- Parameters:
attributes- The initial attributes for the subdirectory.- Returns:
- the request
- Throws:
IOException
-
symlink
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure SYMLINK creates a new symbolic link.
- Parameters:
symbolicLinkData- The string containing the symbolic link data.attributes- The initial attributes for the symbolic link.- Returns:
- the response
- Throws:
IOException
-
makeSymlinkRequest
NfsSymlinkRequest makeSymlinkRequest(String symbolicLinkData, NfsSetAttributes attributes) throws IOException Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure SYMLINK creates a new symbolic link.
- Parameters:
symbolicLinkData- The string containing the symbolic link data.attributes- The initial attributes for the symbolic link.- Returns:
- the request
- Throws:
IOException
-
mknod
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure MKNOD creates a new special file of the type,
type. Special files can be device files or named pipes.- Parameters:
type- The type of the object to be created.attributes- The initial attributes for the special file.rdev- When creating a character special file (typeisNF3CHR) or a block special file (typeisNF3BLK),rdev[0]is the major number andrdev[1]is the minor number.- Returns:
- the response
- Throws:
IOException
-
makeMknodRequest
NfsMknodRequest makeMknodRequest(NfsType type, NfsSetAttributes attributes, long[] rdev) throws IOException Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure MKNOD creates a new special file of the type,
type. Special files can be device files or named pipes.- Parameters:
type- The type of the object to be created.attributes- The initial attributes for the special file.rdev- When creating a character special file (typeisNF3CHR) or a block special file (typeisNF3BLK),rdev[0]is the major number andrdev[1]is the minor number.- Returns:
- the request
- Throws:
IOException
-
remove
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure REMOVE removes (deletes) an entry from a directory. If the entry in the directory was the last reference to the corresponding file system object, the object may be destroyed.
- Returns:
- the response
- Throws:
IOException
-
makeRemoveRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure REMOVE removes (deletes) an entry from a directory. If the entry in the directory was the last reference to the corresponding file system object, the object may be destroyed.
- Returns:
- the request
- Throws:
IOException
-
rmdir
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure RMDIR removes (deletes) a subdirectory from a directory. If the directory entry of the subdirectory is the last reference to the subdirectory, the subdirectory may be destroyed.
- Returns:
- the response
- Throws:
IOException
-
makeRmdirRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure RMDIR removes (deletes) a subdirectory from a directory. If the directory entry of the subdirectory is the last reference to the subdirectory, the subdirectory may be destroyed.
- Returns:
- the request
- Throws:
IOException
-
rename
Makes the RPC call for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure RENAME changes the path of this file to the path specified by
toFile. The operation is required to be atomic to the client. This file andtoFilemust reside on the same file system and server.- Parameters:
toFile- A file object with the new path for this object.- Returns:
- the response
- Throws:
IOException
-
makeRenameRequest
Convenience method for creating the request for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure RENAME changes the path of this file to the path specified by
toFile. The operation is required to be atomic to the client. This file andtoFilemust reside on the same file system and server.- Parameters:
toFile- A file object with the new path for this object.- Returns:
- the request
- Throws:
IOException
-
link
Makes the RPC call for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure LINK creates a hard link from
sourceto this file. This file andsourcemust reside on the same file system and server.- Parameters:
source- The existing file system object to which this file should be linked.- Returns:
- the response
- Throws:
IOException
-
makeLinkRequest
Convenience method for creating the request for these files, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure LINK creates a hard link from
sourceto this file. This file andsourcemust reside on the same file system and server.- Parameters:
source- The existing file system object to which this file should be linked.- Returns:
- the request
- Throws:
IOException
-
readdir
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure READDIR retrieves a variable number of entries, in sequence, from a directory and returns the name and file identifier for each, with information to allow the client to request additional directory entries in a subsequent READDIR request.
- Parameters:
cookie- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieas returned by the server.cookieverf- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieverfas returned by the server. Thecookieverfmust match that returned by the READDIR in which thecookiewas acquired.count- The maximum size of the READDIR3resok structure, in bytes. The size must include all XDR overhead. The server is free to return less than count bytes of data.- Returns:
- the response
- Throws:
IOException
-
readdir
NfsReaddirResponse readdir(long cookie, long cookieverf, int count, List<NfsDirectoryEntry> entries) throws IOException Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure READDIR retrieves a variable number of entries, in sequence, from a directory and returns the name and file identifier for each, with information to allow the client to request additional directory entries in a subsequent READDIR request.
- Parameters:
cookie- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieas returned by the server.cookieverf- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieverfas returned by the server. Thecookieverfmust match that returned by the READDIR in which thecookiewas acquired.count- The maximum size of the READDIR3resok structure, in bytes. The size must include all XDR overhead. The server is free to return less than count bytes of data.entries- A list to which the incoming data should be appended.- Returns:
- the response
- Throws:
IOException
-
makeReaddirRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure READDIR retrieves a variable number of entries, in sequence, from a directory and returns the name and file identifier for each, with information to allow the client to request additional directory entries in a subsequent READDIR request.
- Parameters:
cookie- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieas returned by the server.cookieverf- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieverfas returned by the server. Thecookieverfmust match that returned by the READDIR in which thecookiewas acquired.count- The maximum size of the READDIR3resok structure, in bytes. The size must include all XDR overhead. The server is free to return less than count bytes of data.- Returns:
- the request
- Throws:
IOException
-
readdirplus
NfsReaddirplusResponse readdirplus(long cookie, long cookieverf, int dircount, int maxcount) throws IOException Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure READDIRPLUS retrieves a variable number of entries from a file system directory and returns complete information about each along with information to allow the client to request additional directory entries in a subsequent READDIRPLUS. READDIRPLUS differs from READDIR only in the amount of information returned for each entry. In READDIR, each entry returns the filename and the fileid. In READDIRPLUS, each entry returns the name, the fileid, attributes (including the fileid), and file handle.
- Parameters:
cookie- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieas returned by the server.cookieverf- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieverfas returned by the server. Thecookieverfmust match that returned by the READDIRPLUS in which thecookiewas acquired.dircount- The maximum number of bytes of directory information returned. This number should not include the size of the attributes and file handle portions of the result.maxcount- The maximum size of the READDIRPLUS3resok structure, in bytes. The size must include all XDR overhead. The server is free to return less thanmaxcountbytes of data.- Returns:
- the response
- Throws:
IOException
-
readdirplus
NfsReaddirplusResponse readdirplus(long cookie, long cookieverf, int dircount, int maxcount, List<NfsDirectoryPlusEntry> entries) throws IOException Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure READDIRPLUS retrieves a variable number of entries from a file system directory and returns complete information about each along with information to allow the client to request additional directory entries in a subsequent READDIRPLUS. READDIRPLUS differs from READDIR only in the amount of information returned for each entry. In READDIR, each entry returns the filename and the fileid. In READDIRPLUS, each entry returns the name, the fileid, attributes (including the fileid), and file handle.
- Parameters:
cookie- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieas returned by the server.cookieverf- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieverfas returned by the server. Thecookieverfmust match that returned by the READDIRPLUS in which thecookiewas acquired.dircount- The maximum number of bytes of directory information returned. This number should not include the size of the attributes and file handle portions of the result.maxcount- The maximum size of the READDIRPLUS3resok structure, in bytes. The size must include all XDR overhead. The server is free to return less thanmaxcountbytes of data.entries- A list to which the incoming data should be appended.- Returns:
- the response
- Throws:
IOException
-
makeReaddirplusRequest
NfsReaddirplusRequest makeReaddirplusRequest(long cookie, long cookieverf, int dircount, int maxcount) throws IOException Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure READDIRPLUS retrieves a variable number of entries from a file system directory and returns complete information about each along with information to allow the client to request additional directory entries in a subsequent READDIRPLUS. READDIRPLUS differs from READDIR only in the amount of information returned for each entry. In READDIR, each entry returns the filename and the fileid. In READDIRPLUS, each entry returns the name, the fileid, attributes (including the fileid), and file handle.
- Parameters:
cookie- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieas returned by the server.cookieverf- This should be set to 0 in the first request to read the directory. On subsequent requests, it should be acookieverfas returned by the server. Thecookieverfmust match that returned by the READDIRPLUS in which thecookiewas acquired.dircount- The maximum number of bytes of directory information returned. This number should not include the size of the attributes and file handle portions of the result.maxcount- The maximum size of the READDIRPLUS3resok structure, in bytes. The size must include all XDR overhead. The server is free to return less thanmaxcountbytes of data.- Returns:
- the request
- Throws:
IOException
-
fsstat
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure FSSTAT retrieves volatile file system state information.
- Returns:
- the response
- Throws:
IOException
-
makeFsStatRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure FSSTAT retrieves volatile file system state information.
- Returns:
- the request
- Throws:
IOException
-
fsinfo
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure FSINFO retrieves nonvolatile file system state information and general information about the NFS version 3 protocol server implementation.
- Returns:
- the response
- Throws:
IOException
-
makeFsInfoRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure FSINFO retrieves nonvolatile file system state information and general information about the NFS version 3 protocol server implementation.
- Returns:
- the request
- Throws:
IOException
-
pathconf
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure PATHCONF retrieves the pathconf information for a file or directory. If the FSF_HOMOGENEOUS bit is set in FSFINFO3resok.properties, the pathconf information will be the same for all files and directories in the exported file system in which this file or directory resides.
- Returns:
- the response
- Throws:
IOException
-
makePathconfRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure PATHCONF retrieves the pathconf information for a file or directory. If the FSF_HOMOGENEOUS bit is set in FSFINFO3resok.properties, the pathconf information will be the same for all files and directories in the exported file system in which this file or directory resides.
- Returns:
- the request
- Throws:
IOException
-
commit
Makes the RPC call for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). This call is wrapped as provided by the Nfs client to include repeated attempts, error checking, and logging.Procedure COMMIT forces or flushes data to stable storage that was previously written with a WRITE procedure call with the stable field set to UNSTABLE.
- Parameters:
offsetToCommit- The position within the file at which the flush is to begin. An offset of 0 means to flush data starting at the beginning of the file.dataSizeToCommit- The number of bytes of data to flush. If count is 0, a flush from offset to the end of file is done.- Returns:
- the response
- Throws:
IOException
-
makeCommitRequest
Convenience method for creating the request for this file, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure COMMIT forces or flushes data to stable storage that was previously written with a WRITE procedure call with the stable field set to UNSTABLE.
- Parameters:
offsetToCommit- The position within the file at which the flush is to begin. An offset of 0 means to flush data starting at the beginning of the file.dataSizeToCommit- The number of bytes of data to flush. If count is 0, a flush from offset to the end of file is done.- Returns:
- the request
- Throws:
IOException
-