NFS Client Library

I am looking for a separate library for accessing NFS shares. I'm not looking for stock setups, I just browse and browse files to read.

Preferred something with a simple simple API similar to regular POSIX operations opendir , scandir , read , etc.

Thanks in advance!

+4
source share
2 answers

Here's a link to this NFS client library , but it looks promising, quoting:

  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 because the code was written 
 half on a Mac (tab = 4 spaces).

Here is another link that can explain the limitation of 256 files open simultaneously here on sourceforge.net , see B3 Frequently Asked Questions on sourceforge ...

Edit: Here is a question that was posted here on fooobar.com/questions/113106 / ... regarding recursive directory reading, which can be easily changed to ScanDir ...

+3
source

Github now has a libnfs library: https://github.com/sahlberg/libnfs
I see that Debian and FreeBSD packages .

+2
source

Source: https://habr.com/ru/post/1304071/


All Articles