Lines Matching defs:mode
117 mode_t mode = 0660;
119 SetFileAttributes(updaterLogPath, USER_UPDATE_AUTHORITY, GROUP_UPDATE_AUTHORITY, mode);
124 chmod(stageLogPath.c_str(), mode);
378 std::ios_base::openmode mode = isAppend ? std::ios::app | std::ios::out : std::ios_base::out;
380 std::ofstream fout(dest, mode);
481 mode_t mode = 0660;
483 SetFileAttributes(zipFile, USER_UPDATE_AUTHORITY, GROUP_SYS_AUTHORITY, mode);
521 mode_t mode = 0660;
523 SetFileAttributes(pkgName, USER_UPDATE_AUTHORITY, GROUP_SYS_AUTHORITY, mode);
759 std::string TrimUpdateMode(const std::string &mode)
763 size_t optPos = mode.size();
765 if (mode.empty() || mode == "") {
768 if (mode.find(optEqual) != std::string::npos) {
769 optPos = mode.find(optEqual);
771 if (mode.find(modePrefix) != std::string::npos) {
772 prefixPos = mode.find(modePrefix) + modePrefix.size();
775 return mode;
777 return mode.substr(prefixPos, optPos - prefixPos);
780 bool CheckUpdateMode(const std::string &mode)
784 if (TrimUpdateMode(arg) == mode) {
967 void SetFileAttributes(const std::string& file, uid_t owner, gid_t group, mode_t mode)
975 if (chmod(file.c_str(), mode) != EOK) {
976 LOG(ERROR) << "chmod failed: " << file << " " << mode;