• Home
  • Raw
  • Download

Lines Matching refs:path

164   bool DeleteP2PFile(const FilePath& path, const string& reason);
318 bool P2PManagerImpl::DeleteP2PFile(const FilePath& path, in DeleteP2PFile() argument
320 LOG(INFO) << "Deleting p2p file " << path.value() in DeleteP2PFile()
322 if (unlink(path.value().c_str()) != 0) { in DeleteP2PFile()
323 PLOG(ERROR) << "Error deleting p2p file " << path.value(); in DeleteP2PFile()
504 FilePath path = FileGetPath(file_id); in FileShare() local
505 if (!path.empty()) { in FileShare()
510 LOG(ERROR) << "Existing p2p file " << path.value() in FileShare()
540 path = GetPath(file_id, kNonVisible); in FileShare()
541 int fd = open(path.value().c_str(), O_CREAT | O_RDWR, 0644); in FileShare()
543 PLOG(ERROR) << "Error creating file with path " << path.value(); in FileShare()
564 << " bytes for file " << path.value(); in FileShare()
565 if (unlink(path.value().c_str()) != 0) { in FileShare()
566 PLOG(ERROR) << "Error deleting file with path " << path.value(); in FileShare()
575 PLOG(ERROR) << "Error setting xattr " << path.value(); in FileShare()
585 FilePath path; in FileGetPath() local
587 path = GetPath(file_id, kVisible); in FileGetPath()
588 if (stat(path.value().c_str(), &statbuf) == 0) { in FileGetPath()
589 return path; in FileGetPath()
592 path = GetPath(file_id, kNonVisible); in FileGetPath()
593 if (stat(path.value().c_str(), &statbuf) == 0) { in FileGetPath()
594 return path; in FileGetPath()
597 path.clear(); in FileGetPath()
598 return path; in FileGetPath()
603 FilePath path = FileGetPath(file_id); in FileGetVisible() local
604 if (path.empty()) { in FileGetVisible()
609 *out_result = path.MatchesExtension(kP2PExtension); in FileGetVisible()
614 FilePath path = FileGetPath(file_id); in FileMakeVisible() local
615 if (path.empty()) { in FileMakeVisible()
621 if (path.MatchesExtension(kP2PExtension)) in FileMakeVisible()
624 LOG_ASSERT(path.MatchesExtension(kTmpExtension)); in FileMakeVisible()
625 FilePath new_path = path.RemoveExtension(); in FileMakeVisible()
627 if (rename(path.value().c_str(), new_path.value().c_str()) != 0) { in FileMakeVisible()
628 PLOG(ERROR) << "Error renaming " << path.value() in FileMakeVisible()
637 FilePath path = FileGetPath(file_id); in FileGetSize() local
638 if (path.empty()) in FileGetSize()
641 return utils::FileSize(path.value()); in FileGetSize()
645 FilePath path = FileGetPath(file_id); in FileGetExpectedSize() local
646 if (path.empty()) in FileGetExpectedSize()
651 ea_size = getxattr(path.value().c_str(), kCrosP2PFileSizeXAttrName, in FileGetExpectedSize()
654 PLOG(ERROR) << "Error calling getxattr() on file " << path.value(); in FileGetExpectedSize()