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

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

Issue 12385007: Change MultipartFile.fromFile to MultipartFile.fromPath in pkg/http. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | pkg/http/test/client_test.dart » ('j') | pkg/pkg.status » ('J')
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:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:pathos/path.dart' as path; 10 import '../../../pathos/lib/path.dart' as path;
Bob Nystrom 2013/02/28 00:50:57 I think you need to back out all the way to "pkg"
nweiz 2013/02/28 01:10:54 Done.
11 11
12 import 'byte_stream.dart'; 12 import 'byte_stream.dart';
13 import 'utils.dart'; 13 import 'utils.dart';
14 14
15 /// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to 15 /// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to
16 /// correspond to a physical file. 16 /// correspond to a physical file.
17 class MultipartFile { 17 class MultipartFile {
18 /// The name of the form field for the file. 18 /// The name of the form field for the file.
19 final String field; 19 final String field;
20 20
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // [MultipartRequest]. This returns a [ByteStream] that should emit the body 101 // [MultipartRequest]. This returns a [ByteStream] that should emit the body
102 // of the file. The stream may be closed to indicate an empty file. 102 // of the file. The stream may be closed to indicate an empty file.
103 ByteStream finalize() { 103 ByteStream finalize() {
104 if (isFinalized) { 104 if (isFinalized) {
105 throw new StateError("Can't finalize a finalized MultipartFile."); 105 throw new StateError("Can't finalize a finalized MultipartFile.");
106 } 106 }
107 _isFinalized = true; 107 _isFinalized = true;
108 return _stream; 108 return _stream;
109 } 109 }
110 } 110 }
OLDNEW
« no previous file with comments | « no previous file | pkg/http/test/client_test.dart » ('j') | pkg/pkg.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698