| Index: runtime/vm/dev_fs.h
|
| diff --git a/runtime/vm/dev_fs.h b/runtime/vm/dev_fs.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..68f925ba78d870f2a60371b8d10834fffd21ee3c
|
| --- /dev/null
|
| +++ b/runtime/vm/dev_fs.h
|
| @@ -0,0 +1,55 @@
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +#ifndef VM_DEV_FS_H_
|
| +#define VM_DEV_FS_H_
|
| +
|
| +#include "vm/globals.h"
|
| +
|
| +namespace dart {
|
| +
|
| +class Array;
|
| +class JSONStream;
|
| +class Mutex;
|
| +class ObjectPointerVisitor;
|
| +class RawArray;
|
| +class RawObject;
|
| +class String;
|
| +
|
| +class DevFS {
|
| + public:
|
| + static void Init();
|
| +
|
| + static void ListFileSystems(JSONStream* js);
|
| + static void CreateFileSystem(JSONStream* js, const char* fs_name);
|
| + static void DeleteFileSystem(JSONStream* js, const char* fs_name);
|
| + static void WriteFile(JSONStream* js,
|
| + const char* fs_name,
|
| + const char* path,
|
| + const char* file_contents);
|
| + static void ReadFile(JSONStream* js,
|
| + const char* fs_name,
|
| + const char* path);
|
| +
|
| + static void VisitObjectPointers(ObjectPointerVisitor* visitor);
|
| +
|
| + private:
|
| + static void EnsureStorage();
|
| + static RawArray* LookupFileSystem(const String& fs_name);
|
| + static bool UpdateFileSystem(const String& fs_name, const Array& fs_contents);
|
| +
|
| + static Mutex* mutex_;
|
| +
|
| + static RawObject** from() {
|
| + return reinterpret_cast<RawObject**>(&fs_map_storage_);
|
| + }
|
| + static RawArray* fs_map_storage_;
|
| + static RawObject** to() {
|
| + return reinterpret_cast<RawObject**>(&fs_map_storage_);
|
| + }
|
| +};
|
| +
|
| +} // namespace dart
|
| +
|
| +#endif // VM_DEV_FS_H_
|
|
|