|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.fs.FileStatus
@InterfaceAudience.Public @InterfaceStability.Stable public class FileStatus
Interface that represents the client side information for a file.
Constructor Summary | |
---|---|
FileStatus()
|
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path path)
Constructor for file systems on which symbolic links are not supported |
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path symlink,
Path path)
|
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
Path path)
|
Method Summary | |
---|---|
int |
compareTo(Object o)
Compare this object to another object |
boolean |
equals(Object o)
Compare if this object is equal to another object |
long |
getAccessTime()
Get the access time of the file. |
long |
getBlockSize()
Get the block size of the file. |
String |
getGroup()
Get the group associated with the file. |
long |
getLen()
Get the length of this file, in bytes. |
long |
getModificationTime()
Get the modification time of the file. |
String |
getOwner()
Get the owner of the file. |
Path |
getPath()
|
FsPermission |
getPermission()
Get FsPermission associated with the file. |
short |
getReplication()
Get the replication factor of a file. |
Path |
getSymlink()
|
int |
hashCode()
Returns a hash code value for the object, which is defined as the hash code of the path name. |
boolean |
isDir()
Deprecated. Use isFile() ,
isDirectory() , and isSymlink()
instead. |
boolean |
isDirectory()
Is this a directory? |
boolean |
isFile()
Is this a file? |
boolean |
isSymlink()
Is this a symbolic link? |
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
protected void |
setGroup(String group)
Sets group. |
protected void |
setOwner(String owner)
Sets owner. |
void |
setPath(Path p)
|
protected void |
setPermission(FsPermission permission)
Sets permission. |
void |
setSymlink(Path p)
|
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileStatus()
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, Path path)
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path path)
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path symlink, Path path)
Method Detail |
---|
public long getLen()
public boolean isFile()
public boolean isDirectory()
@Deprecated public boolean isDir()
isFile()
,
isDirectory()
, and isSymlink()
instead.
isFile()
,
isDirectory()
, and isSymlink()
public boolean isSymlink()
public long getBlockSize()
public short getReplication()
public long getModificationTime()
public long getAccessTime()
public FsPermission getPermission()
public String getOwner()
public String getGroup()
public Path getPath()
public void setPath(Path p)
protected void setPermission(FsPermission permission)
permission
- if permission is null, default value is setprotected void setOwner(String owner)
owner
- if it is null, default value is setprotected void setGroup(String group)
group
- if it is null, default value is setpublic Path getSymlink() throws IOException
IOException
public void setSymlink(Path p)
public void write(DataOutput out) throws IOException
Writable
out
.
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public int compareTo(Object o)
compareTo
in interface Comparable
o
- the object to be compared.
ClassCastException
- if the specified object's is not of
type FileStatuspublic boolean equals(Object o)
equals
in class Object
o
- the object to be compared.
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |