• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
GetExecutableDirectoryPath()12 std::pair<bool, std::string> GetExecutableDirectoryPath() {
13   return {false, ""};
14 }
15 
16 static std::string gCachesPath;
17 
InitializeAndroidCachesPath(std::string caches_path)18 void InitializeAndroidCachesPath(std::string caches_path) {
19   gCachesPath = std::move(caches_path);
20 }
21 
GetCachesDirectory()22 fml::UniqueFD GetCachesDirectory() {
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
30