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

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

Issue 2050393002: WIP: 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/observatory/tests/service/dev_fs_test.dart ('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 namespace dart {
11
12 class Array;
13 class JSONStream;
14 class Mutex;
15 class ObjectPointerVisitor;
16 class RawArray;
17 class RawObject;
18 class String;
19
20 class DevFS {
21 public:
22 static void Init();
23
24 static void ListFileSystems(JSONStream* js);
25 static void CreateFileSystem(JSONStream* js, const char* fs_name);
26 static void DeleteFileSystem(JSONStream* js, const char* fs_name);
27 static void WriteFile(JSONStream* js,
28 const char* fs_name,
29 const char* path,
30 const char* file_contents);
31 static void ReadFile(JSONStream* js,
32 const char* fs_name,
33 const char* path);
34
35 static void VisitObjectPointers(ObjectPointerVisitor* visitor);
36
37 private:
38 static void EnsureStorage();
39 static RawArray* LookupFileSystem(const String& fs_name);
40 static bool UpdateFileSystem(const String& fs_name, const Array& fs_contents);
41
42 static Mutex* mutex_;
43
44 static RawObject** from() {
45 return reinterpret_cast<RawObject**>(&fs_map_storage_);
46 }
47 static RawArray* fs_map_storage_;
48 static RawObject** to() {
49 return reinterpret_cast<RawObject**>(&fs_map_storage_);
50 }
51 };
52
53 } // namespace dart
54
55 #endif // VM_DEV_FS_H_
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/dev_fs_test.dart ('k') | runtime/vm/dev_fs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698