Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
10#include "flutter/fml/macros.h"
11
12namespace impeller {
13namespace testing {
14
15/// Keeps track of the global variable for the specified working
16/// directory.
18 public:
19 static WorkingDirectory* Instance();
20
21 std::string GetFilenamePath(const std::string& filename) const;
22
23 void SetPath(const std::string& path);
24
25 const std::string& GetPath() const { return path_; }
26
27 private:
28 WorkingDirectory(const WorkingDirectory&) = delete;
29
30 WorkingDirectory& operator=(const WorkingDirectory&) = delete;
32 static WorkingDirectory* instance_;
33 std::string path_;
34 bool did_set_ = false;
35};
36
37} // namespace testing
38} // namespace impeller
39
40#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()