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

Side by Side Diff: bin/file.h

Issue 8371016: Fix infinite recursion when dealing with cyclic library dependencies. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | bin/file_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_FILE_H_ 5 #ifndef BIN_FILE_H_
6 #define BIN_FILE_H_ 6 #define BIN_FILE_H_
7 7
8 #if defined(_WIN32) 8 #if defined(_WIN32)
9 typedef signed __int64 int64_t; 9 typedef signed __int64 int64_t;
10 typedef unsigned __int8 uint8_t; 10 typedef unsigned __int8 uint8_t;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 off_t Position(); 49 off_t Position();
50 50
51 // Flush contents of file. 51 // Flush contents of file.
52 void Flush(); 52 void Flush();
53 53
54 const char* name() const { return name_; } 54 const char* name() const { return name_; }
55 55
56 static File* OpenFile(const char* name, bool writable); 56 static File* OpenFile(const char* name, bool writable);
57 static bool FileExists(const char* name); 57 static bool FileExists(const char* name);
58 static bool IsAbsolutePath(const char* pathname); 58 static bool IsAbsolutePath(const char* pathname);
59 static char* GetCanonicalPath(const char* name);
59 static const char* PathSeparator(); 60 static const char* PathSeparator();
60 static const char* StringEscapedPathSeparator(); 61 static const char* StringEscapedPathSeparator();
61 62
62 private: 63 private:
63 File(const char* name, FileHandle* handle) : name_(name), handle_(handle) { } 64 File(const char* name, FileHandle* handle) : name_(name), handle_(handle) { }
64 void Close(); 65 void Close();
65 bool IsClosed(); 66 bool IsClosed();
66 67
67 static const int kClosedFd = -1; 68 static const int kClosedFd = -1;
68 69
69 const char* name_; 70 const char* name_;
70 // FileHandle is an OS specific class which stores data about the file. 71 // FileHandle is an OS specific class which stores data about the file.
71 FileHandle* handle_; // OS specific handle for the file. 72 FileHandle* handle_; // OS specific handle for the file.
72 73
73 // DISALLOW_COPY_AND_ASSIGN(File). 74 // DISALLOW_COPY_AND_ASSIGN(File).
74 File(const File&); 75 File(const File&);
75 void operator=(const File&); 76 void operator=(const File&);
76 }; 77 };
77 78
78 #endif // BIN_FILE_H_ 79 #endif // BIN_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698