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.StructShared logic between by handle and file path FILE_INFORMATION.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCommonFileInformation.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 doubleDAYS_BETWEEN_WINDOWS_AND_UNIXstatic intFILE_ATTRIBUTE_DIRECTORYstatic intFILE_ATTRIBUTE_READONLYstatic intNANOSECONDSprivate static longNANOSECONDS_TO_UNIX_EPOCH_FROM_WINDOWS
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommonFileInformation(jnr.ffi.Runtime runtime)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static longasNanoSeconds(long seconds)private longepochNanos(long windowsNanoChunks)abstract CommonFileInformation.HackyFileTimegetCreationTime()longgetCreationTimeNanoseconds()abstract intgetFileAttributes()longgetFileSize()abstract longgetFileSizeHigh()abstract longgetFileSizeLow()abstract CommonFileInformation.HackyFileTimegetLastAccessTime()longgetLastAccessTimeNanoseconds()abstract CommonFileInformation.HackyFileTimegetLastWriteTime()longgetLastWriteTimeNanoseconds()intgetMode(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
-
NANOSECONDS
public static final int NANOSECONDS
- See Also:
- Constant Field Values
-
DAYS_BETWEEN_WINDOWS_AND_UNIX
private static final double DAYS_BETWEEN_WINDOWS_AND_UNIX
- See Also:
- Constant Field Values
-
NANOSECONDS_TO_UNIX_EPOCH_FROM_WINDOWS
private static final long NANOSECONDS_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)
-
getLastWriteTimeNanoseconds
public long getLastWriteTimeNanoseconds()
-
getLastAccessTimeNanoseconds
public long getLastAccessTimeNanoseconds()
-
getCreationTimeNanoseconds
public long getCreationTimeNanoseconds()
-
getFileSize
public long getFileSize()
-
epochNanos
private long epochNanos(long windowsNanoChunks)
-
asNanoSeconds
public static long asNanoSeconds(long seconds)
-
-