本文整理汇总了C++中EncfsConfig::creator方法的典型用法代码示例。如果您正苦于以下问题:C++ EncfsConfig::creator方法的具体用法?C++ EncfsConfig::creator怎么用?C++ EncfsConfig::creator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EncfsConfig
的用法示例。
在下文中一共展示了EncfsConfig::creator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showInfo
static int showInfo( int argc, char **argv )
{
(void)argc;
string rootDir = argv[1];
if( !checkDir( rootDir ))
return EXIT_FAILURE;
EncfsConfig config;
ConfigType type = readConfig( rootDir, config );
// show information stored in config..
switch(type)
{
case Config_None:
// xgroup(diag)
cout << _("Unable to load or parse config file\n");
return EXIT_FAILURE;
case Config_Prehistoric:
// xgroup(diag)
cout << _("A really old EncFS filesystem was found. \n"
"It is not supported in this EncFS build.\n");
return EXIT_FAILURE;
case Config_V3:
// xgroup(diag)
cout << "\n" << autosprintf(_("Version 3 configuration; "
"created by %s\n"), config.creator().c_str());
break;
case Config_V4:
// xgroup(diag)
cout << "\n" << autosprintf(_("Version 4 configuration; "
"created by %s\n"), config.creator().c_str());
break;
case Config_V5:
case Config_V6:
case Config_V7:
// xgroup(diag)
cout << "\n" << autosprintf(_("Version %i configuration; "
"created by %s (revision %i)\n"),
type,
config.creator().c_str(),
config.revision());
break;
}
showFSInfo( config );
return EXIT_SUCCESS;
}
示例2: isValidEncFS
/* Passing a copy to rootDir is on purpose here */
static int isValidEncFS(std::string rootDir) {
if( !checkDir( rootDir ))
return EXIT_FAILURE;
#ifdef ENCFS_SVN
EncfsConfig config;
#else
shared_ptr<EncFSConfig> config(new EncFSConfig);
#endif
ConfigType type = readConfig( rootDir, config );
#ifdef ENCFS_SVN
std::string config_creator = config.creator();
int config_revision = config.revision();
#else
std::string config_creator = config->creator;
int config_revision = config->subVersion;
#endif
std::ostringstream info;
// show information stored in config..
switch(type)
{
case Config_None:
info << "Unable to load or parse config file in " << rootDir;
LOGI(info.str().c_str());
return EXIT_FAILURE;
case Config_Prehistoric:
LOGI("A really old EncFS filesystem was found.\n"
"It is not supported in this EncFS build.");
return EXIT_FAILURE;
case Config_V3:
info << "Version 3 configuration; created by " << config_creator.c_str();
break;
case Config_V4:
info << "Version 4 configuration; created by " << config_creator.c_str();
break;
case Config_V5:
info << "Version 5 configuration; created by " << config_creator.c_str()
<< " (revision " << config_revision << ")";
break;
case Config_V6:
info << "Version 6 configuration; created by " << config_creator.c_str()
<< " (revision " << config_revision << ")";
break;
#ifdef ENCFS_SVN
case Config_V7:
info << "Version 7 configuration; created by " << config_creator.c_str()
<< " (revision " << config_revision << ")";
break;
#endif
}
LOGI(info.str().c_str());
showFSInfo( config );
return EXIT_SUCCESS;
}