当前位置: 首页>>代码示例>>C++>>正文


C++ FileName::fullPath方法代码示例

本文整理汇总了C++中FileName::fullPath方法的典型用法代码示例。如果您正苦于以下问题:C++ FileName::fullPath方法的具体用法?C++ FileName::fullPath怎么用?C++ FileName::fullPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileName的用法示例。


在下文中一共展示了FileName::fullPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: out

bffilebuf::bffilebuf(const FileName &filename, ios::openmode mode) :
	in(0), out(0), readbuf(0), writebuf(0), remaining(0), num(0)
{
	if (mode & ios::in) {
		remaining = FileWriter::getFileSize(filename) - strlen(BF_FILE_IDENTIFICATOR) - 1;
		in = new FileUtils::paloifstream(filename.fullPath().c_str());
		string ident;
		getline(*in, ident);
		if (ident == BF_FILE_IDENTIFICATOR) {
			readbuf = new unsigned char[BUF_SIZE];
			setg((char *)readbuf, (char *)readbuf, (char *)readbuf);
		} else {
			delete in;
			in = 0;
		}
	}
	if (mode & ios::out) {
		size_t s = FileWriter::getFileSize(filename);
		out = new FileUtils::paloofstream(filename.fullPath().c_str(), mode);
		if (!(s && (mode & ios::app))) {
			*out << BF_FILE_IDENTIFICATOR << endl;
		}
		writebuf = new unsigned char[BUF_SIZE];
		setp((char *)writebuf, (char *)(writebuf + BUF_SIZE - 1));
	}
	memcpy(ivec, &initivec, 8);
	BF_set_key(&key, (int)passphrase.size(), (const unsigned char *)passphrase.c_str());
}
开发者ID:abraneo,项目名称:jedox-mirror,代码行数:28,代码来源:FileWriterBF.cpp

示例2: isReadable

bool FileUtils::isReadable(const FileName& fileName) {
  FILE* file = fopen(fileName.fullPath().c_str(), "r");

  if (file == 0) {
    return false;
  } else {
    fclose(file);
    return true;
  }
}
开发者ID:jmeinke,项目名称:StOAP,代码行数:10,代码来源:FileUtils.cpp

示例3: rename

bool FileUtils::rename(const FileName& oldName, const FileName& newName) {
  int result = std::rename(oldName.fullPath().c_str(),
                           newName.fullPath().c_str());
  return (result != 0) ? false : true;
}
开发者ID:jmeinke,项目名称:StOAP,代码行数:5,代码来源:FileUtils.cpp

示例4: remove

bool FileUtils::remove(const FileName& fileName) {
  int result = std::remove(fileName.fullPath().c_str());
  return (result != 0) ? false : true;
}
开发者ID:jmeinke,项目名称:StOAP,代码行数:4,代码来源:FileUtils.cpp


注:本文中的FileName::fullPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。