Flutter Engine
paths_android.cc
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 #include "flutter/fml/platform/android/paths_android.h"
6 
7 #include "flutter/fml/file.h"
8 
9 namespace fml {
10 namespace paths {
11 
12 std::pair<bool, std::string> GetExecutableDirectoryPath() {
13  return {false, ""};
14 }
15 
16 static std::string gCachesPath;
17 
18 void InitializeAndroidCachesPath(std::string caches_path) {
19  gCachesPath = std::move(caches_path);
20 }
21 
23  // If the caches path is not initialized, the FD will be invalid and caching
24  // will be disabled throughout the system.
25  return OpenDirectory(gCachesPath.c_str(), false, fml::FilePermission::kRead);
26 }
27 
28 } // namespace paths
29 } // namespace fml
fml::UniqueFD GetCachesDirectory()
Definition: ascii_trie.cc:9
std::pair< bool, std::string > GetExecutableDirectoryPath()
fml::UniqueFD OpenDirectory(const char *path, bool create_if_necessary, FilePermission permission)
Definition: file_posix.cc:94
static std::string gCachesPath
void InitializeAndroidCachesPath(std::string caches_path)