Lines Matching defs:file
3 // found in the LICENSE file.
56 // We open the file in binary format even if they are text files because
65 // any unusable file yields a result of "false".
94 // any unusable file yields a result of "false".
132 FILE* file = OpenFile(path, "rb");
133 if (!file) {
139 while ((len = fread(buf, 1, sizeof(buf), file)) > 0) {
143 CloseFile(file);
156 FILE* CreateAndOpenTemporaryFile(FilePath* path) {
187 const PlatformFile file = CreatePlatformFile(path, flags, NULL, NULL);
188 if (file != kInvalidPlatformFileValue) {
189 bool result = TouchPlatformFile(file, last_accessed, last_modified);
190 ClosePlatformFile(file);
197 bool CloseFile(FILE* file) {
198 if (file == NULL)
200 return fclose(file) == 0;
203 bool TruncateFile(FILE* file) {
204 if (file == NULL)
206 long current_offset = ftell(file);
210 int fd = _fileno(file);
214 int fd = fileno(file);