1

是否可以像在 Windows 上使用 UNC 路径(或类似路径)一样透明地在 Linux 中使用 C++ IO 流打开 Samba 共享上的文件,还是我总是需要某种第 3 方库?

如果 3rd 方库是唯一的解决方案,那么 Samba 共享访问有哪些 3rd 方库?

4

1 回答 1

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).

于 2012-07-08T20:00:44.587 回答