StructStat


public final class StructStat
extends Object

java.lang.Object
   ↳ android.system.StructStat


File information returned by Os#fstat, Os#lstat, and Os#stat. Corresponds to C's struct stat from <stat.h>.

Summary

Fields

public final StructTimespec st_atim

StructTimespec with time of last access.

public final long st_atime

Seconds part of time of last access.

public final long st_blksize

A file system-specific preferred I/O block size for this object.

public final long st_blocks

Number of blocks allocated for this object.

public final StructTimespec st_ctim

StructTimespec with time of last status change.

public final long st_ctime

Seconds part of time of last status change

public final long st_dev

Device ID of device containing file.

public final int st_gid

Group ID of file.

public final long st_ino

File serial number (inode).

public final int st_mode

Mode (permissions) of file.

public final StructTimespec st_mtim

StructTimespec with time of last modification.

public final long st_mtime

Seconds part of time of last data modification.

public final long st_nlink

Number of hard links to the file.

public final long st_rdev

Device ID (if file is character or block special).

public final long st_size

For regular files, the file size in bytes.

public final int st_uid

User ID of file.

Public constructors

StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid, long st_rdev, long st_size, long st_atime, long st_mtime, long st_ctime, long st_blksize, long st_blocks)

Constructs an instance with the given field values.

StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid, long st_rdev, long st_size, StructTimespec st_atim, StructTimespec st_mtim, StructTimespec st_ctim, long st_blksize, long st_blocks)

Constructs an instance with the given field values.

Public methods

String toString()

Returns a string representation of the object.

Inherited methods

Fields

st_atim

Added in API level 27
public final StructTimespec st_atim

StructTimespec with time of last access.

st_atime

Added in API level 21
public final long st_atime

Seconds part of time of last access.

st_blksize

Added in API level 21
public final long st_blksize

A file system-specific preferred I/O block size for this object. For some file system types, this may vary from file to file.

st_blocks

Added in API level 21
public final long st_blocks

Number of blocks allocated for this object.

st_ctim

Added in API level 27
public final StructTimespec st_ctim

StructTimespec with time of last status change.

st_ctime

Added in API level 21
public final long st_ctime

Seconds part of time of last status change

st_dev

Added in API level 21
public final long st_dev

Device ID of device containing file.

st_gid

Added in API level 21
public final int st_gid

Group ID of file.

st_ino

Added in API level 21
public final long st_ino

File serial number (inode).

st_mode

Added in API level 21
public final int st_mode

Mode (permissions) of file.

st_mtim

Added in API level 27
public final StructTimespec st_mtim

StructTimespec with time of last modification.

st_mtime

Added in API level 21
public final long st_mtime

Seconds part of time of last data modification.

Added in API level 21
public final long st_nlink

Number of hard links to the file.

st_rdev

Added in API level 21
public final long st_rdev

Device ID (if file is character or block special).

st_size

Added in API level 21
public final long st_size

For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. For a shared memory object, the length in bytes. For a typed memory object, the length in bytes. For other file types, the use of this field is unspecified.

st_uid

Added in API level 21
public final int st_uid

User ID of file.

Public constructors

StructStat

Added in API level 21
public StructStat (long st_dev, 
                long st_ino, 
                int st_mode, 
                long st_nlink, 
                int st_uid, 
                int st_gid, 
                long st_rdev, 
                long st_size, 
                long st_atime, 
                long st_mtime, 
                long st_ctime, 
                long st_blksize, 
                long st_blocks)

Constructs an instance with the given field values.

Parameters
st_dev long

st_ino long

st_mode int

st_nlink long

st_uid int

st_gid int

st_rdev long

st_size long

st_atime long

st_mtime long

st_ctime long

st_blksize long

st_blocks long

StructStat

Added in API level 27
public StructStat (long st_dev, 
                long st_ino, 
                int st_mode, 
                long st_nlink, 
                int st_uid, 
                int st_gid, 
                long st_rdev, 
                long st_size, 
                StructTimespec st_atim, 
                StructTimespec st_mtim, 
                StructTimespec st_ctim, 
                long st_blksize, 
                long st_blocks)

Constructs an instance with the given field values.

Parameters
st_dev long

st_ino long

st_mode int

st_nlink long

st_uid int

st_gid int

st_rdev long

st_size long

st_atim StructTimespec

st_mtim StructTimespec

st_ctim StructTimespec

st_blksize long

st_blocks long

Public methods

toString

Added in API level 21
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.