2010-03-14 126 views
4

我正在尋找一些獨立庫來訪問NFS共享。 我不是在尋找安裝共享,只是瀏覽和訪問文件以供閱讀。NFS客戶端庫

優選的東西用類似的opendirscandirread常規POSIX操作簡單簡單的API等

提前感謝!

+0

爲什麼平臺? – skaffman 2010-03-14 17:16:40

+0

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

回答

3

下面是這個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