- All Known Implementing Classes:
BasicPathDetails
public interface PathDetails
Describes a
Path along with its metadata. The information is accurate
as of the time of the entry is created; the same calls at a future point in
time on the associated path using the same FileClient may return a
different value.
Because details can only be reported on existing file system objects, it is safe to assume the associated path existed at the time of the call.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the length of the file represented by the associated path.getPath()Gets the path associated with the metadata.booleanIndicates whether the associated path represents a directory.booleanisFile()Indicates whether the associated path represents a file.booleanisHidden()Indicates whether the associated path is hidden by the file system.booleanIndicates whether the associated path can be read.booleanIndicates whether the associated path can be written.
-
Method Details
-
getPath
Path getPath()Gets the path associated with the metadata.- Returns:
- the associated file system object's path
-
isReadable
boolean isReadable()Indicates whether the associated path can be read.- Returns:
truethe path represents a readable file or directory,falseotherwise.- See Also:
-
isWritable
boolean isWritable()Indicates whether the associated path can be written.- Returns:
truethe path represents a writable file or directory,falseotherwise.- See Also:
-
isFile
boolean isFile()Indicates whether the associated path represents a file.- Returns:
truethe path represents a file,falseotherwise.- See Also:
-
isDirectory
boolean isDirectory()Indicates whether the associated path represents a directory.- Returns:
truethe path represents a directory,falseotherwise.- See Also:
-
getLength
long getLength()Returns the length of the file represented by the associated path.- Returns:
- the length of the file
- See Also:
-
isHidden
boolean isHidden()Indicates whether the associated path is hidden by the file system.- Returns:
trueif the path is hidden,falseotherwise.- See Also:
-