本文整理汇总了C++中EncFS_Context::setRoot方法的典型用法代码示例。如果您正苦于以下问题:C++ EncFS_Context::setRoot方法的具体用法?C++ EncFS_Context::setRoot怎么用?C++ EncFS_Context::setRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EncFS_Context
的用法示例。
在下文中一共展示了EncFS_Context::setRoot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
//encfs_oper.access = encfs_access;
//encfs_oper.create = encfs_create;
encfs_oper.ftruncate = encfs_ftruncate;
encfs_oper.fgetattr = encfs_fgetattr;
//encfs_oper.lock = encfs_lock;
encfs_oper.utimens = encfs_utimens;
//encfs_oper.bmap = encfs_bmap;
#if (__FreeBSD__ >= 10)
// encfs_oper.setvolname
// encfs_oper.exchange
// encfs_oper.getxtimes
// encfs_oper.setbkuptime
// encfs_oper.setchgtime
// encfs_oper.setcrtime
// encfs_oper.chflags
// encfs_oper.setattr_x
// encfs_oper.fsetattr_x
#endif
openssl_init( encfsArgs->isThreaded );
// context is not a smart pointer because it will live for the life of
// the filesystem.
EncFS_Context *ctx = new EncFS_Context;
ctx->publicFilesystem = encfsArgs->opts->ownerCreate;
RootPtr rootInfo = initFS( ctx, encfsArgs->opts );
int returnCode = EXIT_FAILURE;
if( rootInfo )
{
// set the globally visible root directory node
ctx->setRoot( rootInfo->root );
ctx->args = encfsArgs;
ctx->opts = encfsArgs->opts;
if(encfsArgs->isThreaded == false && encfsArgs->idleTimeout > 0)
{
// xgroup(usage)
cerr << _("Note: requested single-threaded mode, but an idle\n"
"timeout was specified. The filesystem will operate\n"
"single-threaded, but threads will still be used to\n"
"implement idle checking.") << endl;
}
// reset umask now, since we don't want it to interfere with the
// pass-thru calls..
umask( 0 );
if(encfsArgs->isDaemon)
{
// switch to logging just warning and error messages via syslog
logNode.reset( new SyslogNode( "encfs" ) );
logNode->subscribeTo( GetGlobalChannel("warning") );
logNode->subscribeTo( GetGlobalChannel("error") );
// disable stderr reporting..
slog.reset();
// keep around a pointer just in case we end up needing it to
// report a fatal condition later (fuse_main exits unexpectedly)...
oldStderr = dup( STDERR_FILENO );
}
try