public final class CLibrary
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
close(int fd) |
static void |
createHardLink(java.io.File sourceFile,
java.io.File destinationFile)
Create a hard link for a given file.
|
static void |
createHardLinkWithExec(java.io.File sourceFile,
java.io.File destinationFile) |
static int |
fcntl(int fd,
int command,
long flags) |
static int |
fsync(int fd) |
static int |
getfd(java.io.FileDescriptor descriptor)
Get system file descriptor from FileDescriptor object.
|
static boolean |
jnaAvailable() |
static boolean |
jnaMemoryLockable() |
static int |
open(java.lang.String path,
int flags) |
static int |
posix_fadvise(int fd,
long offset,
int len,
int flag) |
static void |
tryCloseFD(int fd) |
static int |
tryFcntl(int fd,
int command,
int flags) |
static void |
tryMlockall() |
static int |
tryOpenDirectory(java.lang.String path) |
static void |
trySkipCache(int fd,
long offset,
int len) |
static void |
trySync(int fd) |
public static int fcntl(int fd, int command, long flags) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int posix_fadvise(int fd, long offset, int len, int flag) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int open(java.lang.String path, int flags) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int fsync(int fd) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static int close(int fd) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public static boolean jnaAvailable()
public static boolean jnaMemoryLockable()
public static void tryMlockall()
public static void createHardLink(java.io.File sourceFile, java.io.File destinationFile) throws java.io.IOException
sourceFile
- The name of the source file.destinationFile
- The name of the destination file.java.io.IOException
- if an error has occurred while creating the link.public static void createHardLinkWithExec(java.io.File sourceFile, java.io.File destinationFile) throws java.io.IOException
java.io.IOException
public static void trySkipCache(int fd, long offset, int len)
public static int tryFcntl(int fd, int command, int flags)
public static int tryOpenDirectory(java.lang.String path)
public static void trySync(int fd)
public static void tryCloseFD(int fd)
public static int getfd(java.io.FileDescriptor descriptor)
descriptor
- - FileDescriptor objec to get fd fromCopyright © 2013 The Apache Software Foundation