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

Side by Side Diff: pkg/http/lib/src/multipart_file.dart

Issue 11785028: Commit Martin's patch for pub + lib_v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 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 | utils/archive/entry.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 multipart_file; 5 library multipart_file;
6 6
7 import 'dart:async';
7 import 'dart:io'; 8 import 'dart:io';
8 9
9 import 'utils.dart'; 10 import 'utils.dart';
10 11
11 /// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to 12 /// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to
12 /// correspond to a physical file. 13 /// correspond to a physical file.
13 class MultipartFile { 14 class MultipartFile {
14 /// The name of the form field for the file. 15 /// The name of the form field for the file.
15 final String field; 16 final String field;
16 17
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // [MultipartRequest]. This returns an [InputStream] that should emit the body 97 // [MultipartRequest]. This returns an [InputStream] that should emit the body
97 // of the file. The stream may be closed to indicate an empty file. 98 // of the file. The stream may be closed to indicate an empty file.
98 InputStream finalize() { 99 InputStream finalize() {
99 if (isFinalized) { 100 if (isFinalized) {
100 throw new StateError("Can't finalize a finalized MultipartFile."); 101 throw new StateError("Can't finalize a finalized MultipartFile.");
101 } 102 }
102 _isFinalized = true; 103 _isFinalized = true;
103 return _stream; 104 return _stream;
104 } 105 }
105 } 106 }
OLDNEW
« no previous file with comments | « no previous file | utils/archive/entry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698