I would like to create a FUSE application based on the land file system in Java. There are several binding libraries on the Internet, Fuse-J , jnetfs , Fuseforjava , javafuse .
None of them seem really alive from today, so I first tried it JavaFuse.
The interface we must implement is:
http://code.google.com/p/javafuse/source/browse/fs/JavaFS.java
and I wanted to reproduce this helloworld smooth key example .
Question: Is it likely that this:
static int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi)
{
(void) offset;
(void) fi;
if(strcmp(path, "/") != 0)
return -ENOENT;
filler(buf, ".", NULL, 0);
filler(buf, "..", NULL, 0);
filler(buf, hello_path + 1, NULL, 0);
return 0;
}
can be implemented using this java function:
public int readdir_pre(String path, long buf, long filler, int offset, Fuse_file_info info);
public int readdir_post(String path, long buf, long filler, int offset, Fuse_file_info info, int result);
, - , , filler ...
helloworld, :
public int read_post(String path, String buf, int size, int offset, Fuse_file_info info, int result);
buf size , Java String .