Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: net/disk_cache/os_file.h

Issue 8843: Add write and read/write support to FileStream (renamed from FileInputStream)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/mapped_file_win.cc ('k') | net/disk_cache/os_file_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_DISK_CACHE_OS_FILE_H_
6 #define NET_DISK_CACHE_OS_FILE_H_
7
8 #include <string>
9
10 #include "build/build_config.h"
11
12 namespace disk_cache {
13
14 #if defined(OS_WIN)
15 #include <windows.h>
16 typedef HANDLE OSFile;
17 #elif defined(OS_POSIX)
18 typedef int OSFile;
19 const OSFile INVALID_HANDLE_VALUE = -1;
20 #endif
21
22 enum OSFileFlags {
23 OS_FILE_OPEN = 1,
24 OS_FILE_CREATE = 2,
25 OS_FILE_OPEN_ALWAYS = 4, // May create a new file.
26 OS_FILE_CREATE_ALWAYS = 8, // May overwrite an old file.
27 OS_FILE_READ = 16,
28 OS_FILE_WRITE = 32,
29 OS_FILE_SHARE_READ = 64,
30 OS_FILE_SHARE_WRITE = 128
31 };
32
33 // Creates or open the given file. If OS_FILE_OPEN_ALWAYS is used, and |created|
34 // is provided, |created| will be set to true if the file was created or to
35 // false in case the file was just opened.
36 OSFile CreateOSFile(const std::wstring& name, int flags, bool* created);
37
38 } // namespace disk_cache
39
40 #endif // NET_DISK_CACHE_OS_FILE_H_
OLDNEW
« no previous file with comments | « net/disk_cache/mapped_file_win.cc ('k') | net/disk_cache/os_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698