NFS客户端库

问题描述:

我正在寻找一些独立库来访问NFS共享。 我不是在寻找安装共享,只是浏览和访问文件以供阅读。NFS客户端库

优选的东西用类似的opendirscandirread常规POSIX操作简单简单的API等

提前感谢!

+0

为什么平台? – skaffman 2010-03-14 17:16:40

+0

最好是iPhone,但我会解决任何UNIX-y – reflog 2010-03-14 17:33:45

下面是这个NFS client library一个链接,但它看起来很有希望,到报价:

 
The NFS client handles only one connection at a time, but no connection takes 
very long. 

Read requests must be for under 8000 bytes. This has to do with packet size. 
You don't want to know. 

Once 256 files are open simultaneously -- by all applications, since the client 
does not discriminate between requests in any way -- file handles begin to be 
overwritten. The client prints an error. 

If the client has problems opening sockets it quits gracefully, including 
returning a message over the socket to the application. The exception is if 
it is given a bad hostname to mount, in which case it just responds with failure 
rather than quitting. 

If the formatting of the code looks messed up, it's because the code was written 
half on a Mac (tab = 4 spaces). 

下面是可以解释256个文件的限制同时打开这里sourceforge.net,则查看的B3另一个链接有sourceforge上...

编辑:下面是在这里张贴在Stackoverflow就某一问题递归阅读,可以很容易地修改SCANDIR目录...

+0

谢谢,我应该提到我也找到了这个库。不幸的是,它提供了令人难以置信的基本API,并且不允许像“scandir”这样的操作。这是一个交易断路器:(​​ – reflog 2010-03-14 16:52:31

+0

你可以通过使用opendir,readdir和closedir以递归的方式加入一个简单的scandir .... – t0mm13b 2010-03-14 17:00:43

+0

所有这些问题都很清楚,但是有问题的库不支持'opendir'和'readdir '。 – reflog 2010-03-14 17:33:22

github上现在有一个libnfs库:https://github.com/sahlberg/libnfs
我看它有DebianFreeBSD包。