public class LocalFileStatus extends java.lang.Object implements FileStatus
LocalFileStatus
provides an implementation of the FileStatus
interface for the local file system.Constructor and Description |
---|
LocalFileStatus(java.io.File f,
FileSystem fs)
Creates a
LocalFileStatus object from a given File object. |
Modifier and Type | Method and Description |
---|---|
long |
getAccessTime()
Get the access time of the file.
|
long |
getBlockSize()
Get the block size of the file.
|
java.io.File |
getFile() |
long |
getLen()
Return the length of this file
|
long |
getModificationTime()
Get the modification time of the file.
|
Path |
getPath()
Returns the corresponding Path to the FileStatus.
|
short |
getReplication()
Get the replication factor of a file.
|
boolean |
isDir()
Checks if this object represents a directory.
|
java.lang.String |
toString() |
public LocalFileStatus(java.io.File f, FileSystem fs)
LocalFileStatus
object from a given File
object.f
- the File
object this LocalFileStatus
refers tofs
- the file system the corresponding file has been read frompublic long getAccessTime()
FileStatus
getAccessTime
in interface FileStatus
public long getBlockSize()
FileStatus
getBlockSize
in interface FileStatus
public long getLen()
FileStatus
getLen
in interface FileStatus
public long getModificationTime()
FileStatus
getModificationTime
in interface FileStatus
public short getReplication()
FileStatus
getReplication
in interface FileStatus
public boolean isDir()
FileStatus
isDir
in interface FileStatus
true
if this is a directory, false
otherwisepublic Path getPath()
FileStatus
getPath
in interface FileStatus
public java.io.File getFile()
public java.lang.String toString()
toString
in class java.lang.Object