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

Side by Side Diff: runtime/bin/file.h

Issue 296403005: Show actualy FD for files in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dart2js patch function. Created 6 years, 6 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 | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/file.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 kCreatedTime = 1, 66 kCreatedTime = 1,
67 kModifiedTime = 2, 67 kModifiedTime = 2,
68 kAccessedTime = 3, 68 kAccessedTime = 3,
69 kMode = 4, 69 kMode = 4,
70 kSize = 5, 70 kSize = 5,
71 kStatSize = 6 71 kStatSize = 6
72 }; 72 };
73 73
74 ~File(); 74 ~File();
75 75
76 intptr_t GetFD();
77
76 // Read/Write attempt to transfer num_bytes to/from buffer. It returns 78 // Read/Write attempt to transfer num_bytes to/from buffer. It returns
77 // the number of bytes read/written. 79 // the number of bytes read/written.
78 int64_t Read(void* buffer, int64_t num_bytes); 80 int64_t Read(void* buffer, int64_t num_bytes);
79 int64_t Write(const void* buffer, int64_t num_bytes); 81 int64_t Write(const void* buffer, int64_t num_bytes);
80 82
81 // ReadFully and WriteFully do attempt to transfer num_bytes to/from 83 // ReadFully and WriteFully do attempt to transfer num_bytes to/from
82 // the buffer. In the event of short accesses they will loop internally until 84 // the buffer. In the event of short accesses they will loop internally until
83 // the whole buffer has been transferred or an error occurs. If an error 85 // the whole buffer has been transferred or an error occurs. If an error
84 // occurred the result will be set to false. 86 // occurred the result will be set to false.
85 bool ReadFully(void* buffer, int64_t num_bytes); 87 bool ReadFully(void* buffer, int64_t num_bytes);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // FileHandle is an OS specific class which stores data about the file. 180 // FileHandle is an OS specific class which stores data about the file.
179 FileHandle* handle_; // OS specific handle for the file. 181 FileHandle* handle_; // OS specific handle for the file.
180 182
181 DISALLOW_COPY_AND_ASSIGN(File); 183 DISALLOW_COPY_AND_ASSIGN(File);
182 }; 184 };
183 185
184 } // namespace bin 186 } // namespace bin
185 } // namespace dart 187 } // namespace dart
186 188
187 #endif // BIN_FILE_H_ 189 #endif // BIN_FILE_H_
OLDNEW
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698