Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fml
platform
android
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>
GetExecutablePath
() {
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
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
fml::UniqueObject< int, internal::os_unix::UniqueFDTraits >
fml::paths::InitializeAndroidCachesPath
void InitializeAndroidCachesPath(std::string caches_path)
Definition
paths_android.cc:18
fml::paths::GetExecutablePath
std::pair< bool, std::string > GetExecutablePath()
Definition
paths_android.cc:12
fml::paths::GetCachesDirectory
fml::UniqueFD GetCachesDirectory()
Definition
paths_android.cc:22
fml::paths::gCachesPath
static std::string gCachesPath
Definition
paths_android.cc:16
fml
Definition
ascii_trie.cc:9
fml::OpenDirectory
fml::UniqueFD OpenDirectory(const char *path, bool create_if_necessary, FilePermission permission)
Definition
file_posix.cc:97
fml::FilePermission::kRead
@ kRead
Generated on Fri Apr 26 2024 06:14:05 for Flutter Engine by
1.9.8