Lines Matching defs:file
4 * you may not use this file except in compliance with the License.
392 SyncFile(dest); // no way to get fd from ofstream, so reopen to sync this file
469 ZipFileInfo file {};
470 file.fileInfo.identity = path.substr(path.find_last_of("/") + 1);
471 file.fileInfo.packMethod = PKG_COMPRESS_METHOD_ZIP;
472 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC;
473 zipFiles.push_back(std::pair<std::string, ZipFileInfo>(path, file));
490 // Build the zip file to be packaged
496 ZipFileInfo file;
497 file.fileInfo.identity = name;
498 file.fileInfo.packMethod = PKG_COMPRESS_METHOD_ZIP;
499 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC;
501 files.push_back(std::pair<std::string, ZipFileInfo>(fileName, file));
585 STAGE(UPDATE_STAGE_FAIL) << "Log file error, unable to copy";
596 LOG(ERROR) << "copy log file failed.";
619 LOG(ERROR) << "open result file failed";
635 LOG(ERROR) << "open result file failed";
643 LOG(WARNING) << "write result file failed, err:" << errno;
646 LOG(WARNING) << "close result file failed";
668 LOG(ERROR) << "Failed to get file status: " << filePath << std::endl;
711 LOG(ERROR) << "Failed to get file status: " << filePath;
724 LOG(ERROR) << "Unable to delete file";
729 LOG(ERROR) << "Failed to delete file: " << oldestFilePath;
732 LOG(INFO) << "Delete old file: " << oldestFilePath << " size: " << size;
967 void SetFileAttributes(const std::string& file, uid_t owner, gid_t group, mode_t mode)
970 RestoreconRecurse(file.c_str());
972 if (chown(file.c_str(), USER_ROOT_AUTHORITY, GROUP_ROOT_AUTHORITY) != 0) {
973 LOG(ERROR) << "Chown failed: " << file << " " << USER_ROOT_AUTHORITY << "," << GROUP_ROOT_AUTHORITY;
975 if (chmod(file.c_str(), mode) != EOK) {
976 LOG(ERROR) << "chmod failed: " << file << " " << mode;
978 if (chown(file.c_str(), owner, group) != 0) {
979 LOG(ERROR) << "Chown failed: " << file << " " << owner << "," << group;