transparent access to files on Samba shares on Linux et al. using C++ IO streams

狂风中的少年 提交于 2019-12-11 05:23:40

问题


Is it possible to open files on Samba shares using C++ IO streams in Linux as transparently as on Windows using just UNC path (or similar) or do I always need some kind of 3rd party library?

If a 3rd party library is the only solution, what 3rd party libraries are there for Samba shares access?


回答1:


It looks like you just want to mount the remote server using cifsfs (see "man mount.cifs"), and then access the files from the mount point you specified.

There is no way that you can explicitly specify a UNC path or anything like that directly to standard file system API (on top of which std::fstream operates).



来源:https://stackoverflow.com/questions/11381143/transparent-access-to-files-on-samba-shares-on-linux-et-al-using-c-io-streams

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!