Package jnr.posix.windows
Class CommonFileInformation
- java.lang.Object
-
- jnr.ffi.Struct
-
- jnr.posix.windows.CommonFileInformation
-
- Direct Known Subclasses:
WindowsByHandleFileInformation
,WindowsFileInformation
,WindowsFindData
public abstract class CommonFileInformation extends jnr.ffi.Struct
Shared logic between by handle and file path FILE_INFORMATION.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CommonFileInformation.HackyFileTime
-
Nested classes/interfaces inherited from class jnr.ffi.Struct
jnr.ffi.Struct.AbstractBoolean, jnr.ffi.Struct.AbstractMember, jnr.ffi.Struct.Address, jnr.ffi.Struct.Alignment, jnr.ffi.Struct.AsciiString, jnr.ffi.Struct.AsciiStringRef, jnr.ffi.Struct.blkcnt_t, jnr.ffi.Struct.blksize_t, jnr.ffi.Struct.BOOL16, jnr.ffi.Struct.Boolean, jnr.ffi.Struct.BYTE, jnr.ffi.Struct.caddr_t, jnr.ffi.Struct.cc_t, jnr.ffi.Struct.clock_t, jnr.ffi.Struct.dev_t, jnr.ffi.Struct.Double, jnr.ffi.Struct.DWORD, jnr.ffi.Struct.Enum<T extends java.lang.Enum<T>>, jnr.ffi.Struct.Enum16<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Enum32<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Enum64<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Enum8<E extends java.lang.Enum<E>>, jnr.ffi.Struct.EnumField<E extends java.lang.Object>, jnr.ffi.Struct.EnumLong<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Float, jnr.ffi.Struct.fsblkcnt_t, jnr.ffi.Struct.fsfilcnt_t, jnr.ffi.Struct.Function<T extends java.lang.Object>, jnr.ffi.Struct.gid_t, jnr.ffi.Struct.id_t, jnr.ffi.Struct.in_addr_t, jnr.ffi.Struct.in_port_t, jnr.ffi.Struct.ino_t, jnr.ffi.Struct.ino64_t, jnr.ffi.Struct.int16_t, jnr.ffi.Struct.int32_t, jnr.ffi.Struct.int64_t, jnr.ffi.Struct.int8_t, jnr.ffi.Struct.IntegerAlias, jnr.ffi.Struct.intptr_t, jnr.ffi.Struct.key_t, jnr.ffi.Struct.LONG, jnr.ffi.Struct.Member, jnr.ffi.Struct.mode_t, jnr.ffi.Struct.nlink_t, jnr.ffi.Struct.NumberField, jnr.ffi.Struct.off_t, jnr.ffi.Struct.Offset, jnr.ffi.Struct.Padding, jnr.ffi.Struct.pid_t, jnr.ffi.Struct.Pointer, jnr.ffi.Struct.PointerField, jnr.ffi.Struct.rlim_t, jnr.ffi.Struct.sa_family_t, jnr.ffi.Struct.Signed16, jnr.ffi.Struct.Signed32, jnr.ffi.Struct.Signed64, jnr.ffi.Struct.Signed8, jnr.ffi.Struct.SignedLong, jnr.ffi.Struct.size_t, jnr.ffi.Struct.socklen_t, jnr.ffi.Struct.speed_t, jnr.ffi.Struct.ssize_t, jnr.ffi.Struct.String, jnr.ffi.Struct.StructRef<T extends jnr.ffi.Struct>, jnr.ffi.Struct.swblk_t, jnr.ffi.Struct.tcflag_t, jnr.ffi.Struct.time_t, jnr.ffi.Struct.u_int16_t, jnr.ffi.Struct.u_int32_t, jnr.ffi.Struct.u_int64_t, jnr.ffi.Struct.u_int8_t, jnr.ffi.Struct.uid_t, jnr.ffi.Struct.uintptr_t, jnr.ffi.Struct.Unsigned16, jnr.ffi.Struct.Unsigned32, jnr.ffi.Struct.Unsigned64, jnr.ffi.Struct.Unsigned8, jnr.ffi.Struct.UnsignedLong, jnr.ffi.Struct.UTF8String, jnr.ffi.Struct.UTF8StringRef, jnr.ffi.Struct.UTFString, jnr.ffi.Struct.UTFStringRef, jnr.ffi.Struct.WBOOL, jnr.ffi.Struct.WORD
-
-
Field Summary
Fields Modifier and Type Field Description private static double
DAYS_BETWEEN_WINDOWS_AND_UNIX
static int
FILE_ATTRIBUTE_DIRECTORY
static int
FILE_ATTRIBUTE_READONLY
private static int
MICROSECONDS
private static long
MICROSECONDS_TO_UNIX_EPOCH_FROM_WINDOWS
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommonFileInformation(jnr.ffi.Runtime runtime)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private long
asMicroSeconds(long windowsNanosecondTime)
static long
asNanoSeconds(long seconds)
abstract CommonFileInformation.HackyFileTime
getCreationTime()
long
getCreationTimeMicroseconds()
abstract int
getFileAttributes()
long
getFileSize()
abstract long
getFileSizeHigh()
abstract long
getFileSizeLow()
abstract CommonFileInformation.HackyFileTime
getLastAccessTime()
long
getLastAccessTimeMicroseconds()
abstract CommonFileInformation.HackyFileTime
getLastWriteTime()
long
getLastWriteTimeMicroseconds()
int
getMode(java.lang.String path)
-
Methods inherited from class jnr.ffi.Struct
alignment, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, arrayBegin, arrayEnd, arrayOf, function, getMemory, getMemory, getRuntime, inner, inner, isDirect, size, size, size, toString, useMemory
-
-
-
-
Field Detail
-
FILE_ATTRIBUTE_READONLY
public static int FILE_ATTRIBUTE_READONLY
-
FILE_ATTRIBUTE_DIRECTORY
public static int FILE_ATTRIBUTE_DIRECTORY
-
MICROSECONDS
private static final int MICROSECONDS
- See Also:
- Constant Field Values
-
DAYS_BETWEEN_WINDOWS_AND_UNIX
private static final double DAYS_BETWEEN_WINDOWS_AND_UNIX
- See Also:
- Constant Field Values
-
MICROSECONDS_TO_UNIX_EPOCH_FROM_WINDOWS
private static final long MICROSECONDS_TO_UNIX_EPOCH_FROM_WINDOWS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFileAttributes
public abstract int getFileAttributes()
-
getCreationTime
public abstract CommonFileInformation.HackyFileTime getCreationTime()
-
getLastAccessTime
public abstract CommonFileInformation.HackyFileTime getLastAccessTime()
-
getLastWriteTime
public abstract CommonFileInformation.HackyFileTime getLastWriteTime()
-
getFileSizeHigh
public abstract long getFileSizeHigh()
-
getFileSizeLow
public abstract long getFileSizeLow()
-
getMode
public int getMode(java.lang.String path)
-
getLastWriteTimeMicroseconds
public long getLastWriteTimeMicroseconds()
-
getLastAccessTimeMicroseconds
public long getLastAccessTimeMicroseconds()
-
getCreationTimeMicroseconds
public long getCreationTimeMicroseconds()
-
getFileSize
public long getFileSize()
-
asMicroSeconds
private long asMicroSeconds(long windowsNanosecondTime)
-
asNanoSeconds
public static long asNanoSeconds(long seconds)
-
-