Flutter Engine
The Flutter Engine
working_directory.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_GOLDEN_TESTS_WORKING_DIRECTORY_H_
6#define FLUTTER_IMPELLER_GOLDEN_TESTS_WORKING_DIRECTORY_H_
7
8#include <string>
9
10namespace impeller {
11namespace testing {
12
13/// Keeps track of the global variable for the specified working
14/// directory.
16 public:
17 static WorkingDirectory* Instance();
18
19 std::string GetFilenamePath(const std::string& filename) const;
20
21 void SetPath(const std::string& path);
22
23 const std::string& GetPath() const { return path_; }
24
25 private:
26 WorkingDirectory(const WorkingDirectory&) = delete;
27
28 WorkingDirectory& operator=(const WorkingDirectory&) = delete;
30 static WorkingDirectory* instance_;
31 std::string path_;
32 bool did_set_ = false;
33};
34
35} // namespace testing
36} // namespace impeller
37
38#endif // FLUTTER_IMPELLER_GOLDEN_TESTS_WORKING_DIRECTORY_H_
std::string GetFilenamePath(const std::string &filename) const
void SetPath(const std::string &path)
const std::string & GetPath() const
static WorkingDirectory * Instance()
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57