public interface PosixNativeUtil extends NativeUtil
| Modifier and Type | Method and Description |
|---|---|
String |
__get_cpuid_count_model()
Returns the CPU Model string.
|
int[] |
__get_cpuid_count(int code,
int subcode)
queries the cpu for info.
|
NativeMemory |
malloc(long size)
Allocates a new pointer of the given size
|
NativeMemory |
pointer(long ptr,
long size,
PointerHandler handler)
Any calls to the resulting NativeMemory may cause the JVM to die due to a SEGFAULT is size is not specified correctly.
|
Stat |
stat(String path)
Gets information about a file for a given path.
|
void |
symlink(String target,
String linkpath)
Creates a symlink pointing to target.
|
Utsname |
uname()
gets information about the unix system.
|
void |
unlink(String path)
Unlinks a link
|
NativeMemory malloc(long size) throws OutOfMemoryError, IllegalArgumentException
OutOfMemoryError - if malloc returns NULLIllegalArgumentException - if size is <= 0NativeMemory pointer(long ptr, long size, PointerHandler handler) throws NullPointerException
ptr - pointer to the datasize - -1 if unknown.NullPointerExceptionStat stat(String path) throws FileNotFoundException, InvalidPathException, FileSystemLoopException, AccessDeniedException, UnknownNativeErrorException, IOException
path - the path to the fileIllegalArgumentException - If path is nullFileNotFoundException - If the file cannot be foundFileSystemLoopException - If too many sym links had to be followed to resolve the pathInvalidPathException - If the path is invalid (empty string, parent is not a directory etc)AccessDeniedException - If the process lacks permission to resolve the path. (Parent directory does not have permission to list files for example)IOException - If a unspecified IO error occures while reading the info from disc.UnknownNativeErrorException - If any unexpected native error occures.void symlink(String target, String linkpath) throws IOException, InvalidPathException, ReadOnlyFileSystemException, AccessDeniedException, FileAlreadyExistsException, UnknownNativeErrorException
IOException - If an IOError occurs when creating the symlinkInvalidPathException - If any of the two paths is invalidIllegalArgumentException - If target or linkpath is nullReadOnlyFileSystemException - If the file system of linkpath is read only.AccessDeniedException - If the process lacks permission to write to linkpath. (and/or do path resolving)FileAlreadyExistsException - If the file at "linkpath" already existsUnknownNativeErrorException - If any unexpected native error occures.QuotaExceededException - If any os enforced quota limit is violated by creating the link.void unlink(String path) throws IOException, AccessDeniedException, ResourceBusyException, FileIsDirectoryException, FileSystemLoopException, ReadOnlyFileSystemException
path - specifies the path to the link to unlink.IOException - If an IOError occurs when unlinkingAccessDeniedException - If EACCESS occursResourceBusyException - if EBUSY occursFileIsDirectoryException - If path is a directory and not a symlink (Linux Only)FileSystemLoopException - If the path contains a loop of symbolic linksReadOnlyFileSystemException - If the file system is read onlyint[] __get_cpuid_count(int code,
int subcode)
String __get_cpuid_count_model()
Utsname uname()
Copyright © 2024. All rights reserved.