@NotThreadSafe public abstract class UfsStatus extends Object
UnderFileSystem
returns entries of this class.Modifier and Type | Field and Description |
---|---|
protected String |
mGroup |
protected boolean |
mIsDirectory |
protected Long |
mLastModifiedTimeMs
Last modified epoch time in ms, or null if it is not available.
|
protected short |
mMode |
protected String |
mName |
protected String |
mOwner |
protected Map<String,byte[]> |
mXAttr |
Modifier | Constructor and Description |
---|---|
protected |
UfsStatus(String name,
boolean isDirectory,
String owner,
String group,
short mode,
Long lastModifiedTimeMs,
Map<String,byte[]> xAttrs)
Creates new instance of
UfsStatus . |
protected |
UfsStatus(UfsStatus status)
Creates a new instance of
UfsStatus as a copy. |
Modifier and Type | Method and Description |
---|---|
static String[] |
convertToNames(UfsStatus[] children)
Converts an array of UFS file status to a listing result where each element in the array is
a file or directory name.
|
abstract UfsStatus |
copy()
Create a copy of
UfsStatus . |
boolean |
equals(Object o) |
String |
getGroup()
Gets the group of the given path.
|
Long |
getLastModifiedTime()
Gets the UTC time of when the indicated path was modified recently in ms, or null if the last
modified time is not available.
|
short |
getMode()
Gets the mode of the given path in short format, e.g 0700.
|
String |
getName() |
String |
getOwner()
Gets the owner of the given path.
|
Map<String,byte[]> |
getXAttr()
Returns the extended attributes from the Ufs, if any.
|
int |
hashCode() |
boolean |
isDirectory() |
boolean |
isFile() |
UfsStatus |
setName(String name)
Set the name of file or directory.
|
protected com.google.common.base.MoreObjects.ToStringHelper |
toStringHelper() |
protected final boolean mIsDirectory
protected final Long mLastModifiedTimeMs
protected String mName
protected final String mOwner
protected final String mGroup
protected final short mMode
protected UfsStatus(String name, boolean isDirectory, String owner, String group, short mode, @Nullable Long lastModifiedTimeMs, @Nullable Map<String,byte[]> xAttrs)
UfsStatus
.name
- relative path of file or directoryisDirectory
- whether the path is a directoryowner
- of the filegroup
- of the filemode
- of the filelastModifiedTimeMs
- last modified epoch time in ms, or null if it is not availablexAttrs
- any extended attributes on the inode@Nullable public static String[] convertToNames(UfsStatus[] children)
children
- array of listing statusespublic boolean isDirectory()
public boolean isFile()
public String getGroup()
@Nullable public Long getLastModifiedTime()
public short getMode()
public String getName()
public String getOwner()
@Nullable public Map<String,byte[]> getXAttr()
public UfsStatus setName(String name)
name
- of entryprotected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
Copyright © 2023. All Rights Reserved.