Lines Matching defs:mode
146 // Appends |mode_char| to |mode| before the optional character set encoding; see
150 std::string AppendModeCharacter(std::string_view mode, char mode_char) {
151 std::string result(mode);
311 bool GetPosixFilePermissions(const FilePath& path, int* mode) {
312 DCHECK(mode);
320 *mode = file_info.st_mode & FILE_PERMISSION_MASK;
324 bool SetPosixFilePermissions(const FilePath& path, int mode) {
325 DCHECK_EQ(mode & ~FILE_PERMISSION_MASK, 0);
334 updated_mode_bits |= mode & FILE_PERMISSION_MASK;
512 FILE* OpenFile(const FilePath& filename, const char* mode) {
514 // present before a comma in |mode|.
516 strchr(mode, 'e') == nullptr ||
517 (strchr(mode, ',') != nullptr && strchr(mode, 'e') > strchr(mode, ',')));
520 // macOS does not provide a mode character to set O_CLOEXEC; see
522 const char* the_mode = mode;
524 std::string mode_with_e(AppendModeCharacter(mode, 'e'));
538 FILE* FileToFILE(File file, const char* mode) {
539 FILE* stream = fdopen(file.GetPlatformFile(), mode);