Lines Matching defs:file
3 // found in the LICENSE file.
5 #include "net/disk_cache/file.h"
17 MyOverlapped(disk_cache::File* file, size_t offset,
25 scoped_refptr<disk_cache::File> file_;
56 MyOverlapped::MyOverlapped(disk_cache::File* file, size_t offset,
61 file_ = file;
69 File::File(base::PlatformFile file)
71 sync_platform_file_(file) {
74 bool File::Init(const FilePath& name) {
100 File::~File() {
110 base::PlatformFile File::platform_file() const {
116 bool File::IsValid() const {
123 bool File::Read(void* buffer, size_t buffer_len, size_t offset) {
140 bool File::Write(const void* buffer, size_t buffer_len, size_t offset) {
157 // We have to increase the ref counter of the file before performing the IO to
158 // prevent the completion to happen with an invalid handle (if the file is
160 bool File::Read(void* buffer, size_t buffer_len, size_t offset,
192 bool File::Write(const void* buffer, size_t buffer_len, size_t offset,
204 bool File::AsyncWrite(const void* buffer, size_t buffer_len, size_t offset,
232 bool File::SetLength(size_t length) {
238 HANDLE file = platform_file();
239 if (INVALID_SET_FILE_POINTER == SetFilePointer(file, size, NULL, FILE_BEGIN))
242 return TRUE == SetEndOfFile(file);
245 size_t File::GetLength() {
248 HANDLE file = platform_file();
249 if (!GetFileSizeEx(file, &size))
258 void File::WaitForPendingIO(int* num_pending_io) {