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

Side by Side Diff: third_party/lzma/v4_65/files/CPP/Common/C_FileIO.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months 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
OLDNEW
(Empty)
1 // Common/C_FileIO.h
2
3 #ifndef __COMMON_C_FILEIO_H
4 #define __COMMON_C_FILEIO_H
5
6 #include <stdio.h>
7 #include <sys/types.h>
8
9 #include "Types.h"
10 #include "MyWindows.h"
11
12 namespace NC {
13 namespace NFile {
14 namespace NIO {
15
16 class CFileBase
17 {
18 protected:
19 int _handle;
20 bool OpenBinary(const char *name, int flags);
21 public:
22 CFileBase(): _handle(-1) {};
23 ~CFileBase() { Close(); }
24 bool Close();
25 bool GetLength(UInt64 &length) const;
26 off_t Seek(off_t distanceToMove, int moveMethod) const;
27 };
28
29 class CInFile: public CFileBase
30 {
31 public:
32 bool Open(const char *name);
33 bool OpenShared(const char *name, bool shareForWrite);
34 ssize_t Read(void *data, size_t size);
35 };
36
37 class COutFile: public CFileBase
38 {
39 public:
40 bool Create(const char *name, bool createAlways);
41 bool Open(const char *name, DWORD creationDisposition);
42 ssize_t Write(const void *data, size_t size);
43 };
44
45 }}}
46
47 #endif
OLDNEW
« no previous file with comments | « third_party/lzma/v4_65/files/CPP/Common/CRC.cpp ('k') | third_party/lzma/v4_65/files/CPP/Common/C_FileIO.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698