Lines Matching defs:file

3 // found in the LICENSE file.
115 // Report success if the file or path does not exist.
290 // Use GUID instead of ::GetTempFileName() to generate unique file names.
291 // "Due to the algorithm used to generate file names, GetTempFileName can
293 // In such cases, it is recommended that you construct unique file names based
298 File file;
305 file.Initialize(temp_name, kFlags);
306 if (file.IsValid())
310 if (!file.IsValid()) {
311 DPLOG(WARNING) << "Failed to get temporary file name in "
313 return file;
323 // GetLongPathName() failed, but we still have a temporary file.
327 return file;
371 << "), " << "conflicts with existing file.";
378 // Invariant: Path does not exist as file or directory.
402 // were racing with someone creating the same directory, or a file
478 // from a file handle. If we ever deprecate XP, consider changing the
488 // Create a file mapping object. Can't easily use MemoryMappedFile, because
490 // not map an empty file, this call fails in that case.
498 // Use a view of the file to get the path to the file.
561 FILE* FileToFILE(File file, const char* mode) {
562 if (!file.IsValid())
565 _open_osfhandle(reinterpret_cast<intptr_t>(file.GetPlatformFile()), 0);
568 file.TakePlatformFile();
576 win::ScopedHandle file(CreateFile(ToWCharT(&filename.value()), GENERIC_READ,
580 if (!file.IsValid())
584 if (::ReadFile(file.Get(), data, max_size, &read, NULL))
591 win::ScopedHandle file(CreateFile(ToWCharT(&filename.value()), GENERIC_WRITE,
594 if (!file.IsValid()) {
601 BOOL result = ::WriteFile(file.Get(), data, size, &written, NULL);
607 DPLOG(WARNING) << "writing file " << UTF16ToUTF8(filename.value())
618 win::ScopedHandle file(CreateFile(ToWCharT(&filename.value()),
621 if (!file.IsValid()) {
626 BOOL result = ::WriteFile(file.Get(), data, size, &written, NULL);