OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 index.store.separate_file_mananer; | 5 library engine.src.index.store.separate_file_mananer; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:analysis_server/src/index/store/split_store.dart'; | 10 import 'package:analyzer/src/index/store/split_store.dart'; |
11 import 'package:path/path.dart' as pathos; | 11 import 'package:path/path.dart' as pathos; |
12 | 12 |
13 | 13 |
14 /** | 14 /** |
15 * An implementation of [FileManager] that keeps each file in a separate file | 15 * An implementation of [FileManager] that keeps each file in a separate file |
16 * system file. | 16 * system file. |
17 */ | 17 */ |
18 class SeparateFileManager implements FileManager { | 18 class SeparateFileManager implements FileManager { |
19 final Directory _directory; | 19 final Directory _directory; |
20 | 20 |
(...skipping 28 matching lines...) Expand all Loading... |
49 | 49 |
50 @override | 50 @override |
51 Future write(String name, List<int> bytes) { | 51 Future write(String name, List<int> bytes) { |
52 return _getFile(name).writeAsBytes(bytes); | 52 return _getFile(name).writeAsBytes(bytes); |
53 } | 53 } |
54 | 54 |
55 File _getFile(String name) { | 55 File _getFile(String name) { |
56 String path = pathos.join(_directory.path, name); | 56 String path = pathos.join(_directory.path, name); |
57 return new File(path); | 57 return new File(path); |
58 } | 58 } |
59 } | 59 } |
OLD | NEW |