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

Side by Side Diff: utils/archive/reader.dart

Issue 10832116: Attach the native entry struct to the ArchiveEntry object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix the ISO9660 constant Created 8 years, 4 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 | « utils/archive/reader.c ('k') | utils/archive/utils.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #library("reader"); 5 #library("reader");
6 6
7 #import("input_stream.dart"); 7 #import("input_stream.dart");
8 #import("options.dart"); 8 #import("options.dart");
9 #import("read_request.dart"); 9 #import("read_request.dart");
10 #import("utils.dart"); 10 #import("utils.dart");
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 id = _id; 70 id = _id;
71 return call(OPEN_MEMORY, id, [bytesForC(data)]); 71 return call(OPEN_MEMORY, id, [bytesForC(data)]);
72 }).transform((_) => new ArchiveInputStream(id)); 72 }).transform((_) => new ArchiveInputStream(id));
73 } 73 }
74 74
75 /** 75 /**
76 * Creates an archive struct, applies all the configuration options to it, and 76 * Creates an archive struct, applies all the configuration options to it, and
77 * returns its id. 77 * returns its id.
78 */ 78 */
79 Future<int> _createArchive() { 79 Future<int> _createArchive() {
80 return call(NEW, null).chain((id) { 80 return call(NEW).chain((id) {
81 if (id == 0 || id == null) { 81 if (id == 0 || id == null) {
82 throw new ArchiveException("Archive is invalid or closed."); 82 throw new ArchiveException("Archive is invalid or closed.");
83 } 83 }
84 return _pushConfiguration(id).transform((_) => id); 84 return _pushConfiguration(id).transform((_) => id);
85 }); 85 });
86 } 86 }
87 87
88 /** 88 /**
89 * Applies all configuration in this archive to the archive identified by 89 * Applies all configuration in this archive to the archive identified by
90 * [id]. Returns a future that completes once all the configuration is 90 * [id]. Returns a future that completes once all the configuration is
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 /** 279 /**
280 * Options for individual formats. See [the libarchive documentation][wiki] 280 * Options for individual formats. See [the libarchive documentation][wiki]
281 * for a list of available options. 281 * for a list of available options.
282 * 282 *
283 * [wiki]: https://github.com/libarchive/libarchive/wiki/ManPageArchiveReadSet Options3 283 * [wiki]: https://github.com/libarchive/libarchive/wiki/ManPageArchiveReadSet Options3
284 */ 284 */
285 final ArchiveOptions options; 285 final ArchiveOptions options;
286 286
287 Format._() : options = new ArchiveOptions(); 287 Format._() : options = new ArchiveOptions();
288 } 288 }
OLDNEW
« no previous file with comments | « utils/archive/reader.c ('k') | utils/archive/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698