透明访问Linux等上的Samba共享上的文件.使用C ++ IO流 [英] transparent access to files on Samba shares on Linux et al. using C++ IO streams

查看:110
本文介绍了透明访问Linux等上的Samba共享上的文件.使用C ++ IO流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

如果只有第三方库是唯一的解决方案,那么有哪些第三方库可供Samba共享访问?

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

推荐答案

您似乎只想使用cifsfs挂载远程服务器(请参阅"man mount.cifs"),然后从您的挂载点访问文件指定.

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.

您无法直接向标准文件系统API(在std :: fstream起作用的基础上)显式指定UNC路径或类似的路径.

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

这篇关于透明访问Linux等上的Samba共享上的文件.使用C ++ IO流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆