org.catacombae.jfuse.types.fuse26
Class FUSEDirFil
java.lang.Object
org.catacombae.jfuse.types.fuse26.FUSEDirFil
public class FUSEDirFil
- extends Object
Used by deprecated getdir() method
Constructor Summary |
FUSEDirFil(byte[] nativeContextPointer)
|
Method Summary |
int |
fill(byte[] name,
int type,
long ino)
Fills a directory entry in a getdir operation. |
static int |
fillNative(byte[] nativeContextPointer,
byte[] name,
int type,
long ino)
|
void |
finalize()
|
static void |
freeNative(byte[] nativeContextPointer)
Frees a native pointer value, stored in the byte array
nativeContextPointer . |
nativeContextPointer
public final byte[] nativeContextPointer
FUSEDirFil
public FUSEDirFil(byte[] nativeContextPointer)
finalize
public void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
fill
public int fill(byte[] name,
int type,
long ino)
- Fills a directory entry in a getdir operation.
- Parameters:
name
- the name of the directory entry.type
- file type. See sys/dirent.h. Valid values are the DT_
constants. (Set this to DT_UNKNOWN (0) if you're lazy.)ino
- inode number. This is limited to 32 bits on most systems,
but 64-bit inode numbers do exist. As such, we use the long
data type. (Set this to 0 if you're lazy.)
- Returns:
- 1 if the buffer is full (?), 0 otherwise (?). (I'm unsure
about this... it's undocumented in fuse.h.)
fillNative
public static int fillNative(byte[] nativeContextPointer,
byte[] name,
int type,
long ino)
freeNative
public static void freeNative(byte[] nativeContextPointer)
- Frees a native pointer value, stored in the byte array
nativeContextPointer
.
TODO: Move this to a general utility class.
- Parameters:
nativeContextPointer
- a byte array containing the pointer value.