Upload upstream chromium 76.0.3809.146
[platform/framework/web/chromium-efl.git] / base / fuchsia / file_utils.h
1 // Copyright 2018 The Chromium 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 BASE_FUCHSIA_FILE_UTILS_H_
6 #define BASE_FUCHSIA_FILE_UTILS_H_
7
8 #include <fuchsia/io/cpp/fidl.h>
9
10 #include "base/base_export.h"
11 #include "base/files/file_path.h"
12
13 namespace base {
14 namespace fuchsia {
15
16 // Persisted data directory, i.e. /data . Returned as DIR_APP_DATA from
17 // PathService.
18 BASE_EXPORT extern const char kPersistedDataDirectoryPath[];
19
20 // Services directory, i.e. /svc .
21 BASE_EXPORT extern const char kServiceDirectoryPath[];
22
23 // Package root directory, i.e. /pkg .
24 BASE_EXPORT extern const char kPackageRootDirectoryPath[];
25
26 // Returns fuchsia.io.Directory for the specified |path| or null InterfaceHandle
27 // if the path doesn't exist or it's not a directory.
28 BASE_EXPORT fidl::InterfaceHandle<::fuchsia::io::Directory> OpenDirectory(
29     const base::FilePath& path);
30
31 }  // namespace fuchsia
32 }  // namespace base
33
34 #endif  // BASE_FUCHSIA_FILE_UTILS_H_