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

Side by Side Diff: runtime/vm/dev_fs.h

Issue 2059883003: DevFS initial implementation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dev_fs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 #ifndef VM_DEV_FS_H_
6 #define VM_DEV_FS_H_
7
8 #include "vm/globals.h"
9
10 #include "vm/dart_api_impl.h"
11
12 namespace dart {
13
14 class Array;
15 class FileSystem;
16 class JSONStream;
17 class Mutex;
18 class ObjectPointerVisitor;
19 class RawArray;
20 class RawObject;
21 class String;
22
23
24 // Manages dart-devfs:// file systems. These file systems are "virtual"
25 // and accessed via the service protocol.
26 class DevFS {
27 public:
28 static void Init();
29 static void Cleanup();
30
31 static void ListFileSystems(JSONStream* js);
32 static void CreateFileSystem(JSONStream* js, const String& fs_name);
33 static void DeleteFileSystem(JSONStream* js, const String& fs_name);
34 static void ListFiles(JSONStream* js,
35 const String& fs_name);
36 static void WriteFiles(JSONStream* js,
37 const String& fs_name,
38 const Array& files);
39 static void WriteFile(JSONStream* js,
40 const String& fs_name,
41 const String& path,
42 const String& file_contents);
43 static void ReadFile(JSONStream* js,
44 const String& fs_name,
45 const String& path);
46
47 private:
48 static Mutex* mutex_;
49 static FileSystem* LookupFileSystem(const String& fs_name);
50 static FileSystem* LookupFileSystem(const char* fs_name);
51 };
52
53 } // namespace dart
54
55 #endif // VM_DEV_FS_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dev_fs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698