file_utils.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #ifndef BASE_FUCHSIA_FILE_UTILS_H_
  5. #define BASE_FUCHSIA_FILE_UTILS_H_
  6. #include <fuchsia/io/cpp/fidl.h>
  7. #include "base/base_export.h"
  8. #include "base/files/file_path.h"
  9. namespace base {
  10. namespace fuchsia {
  11. // Persisted data directory, i.e. /data . Returned as DIR_APP_DATA from
  12. // PathService.
  13. BASE_EXPORT extern const char kPersistedDataDirectoryPath[];
  14. // Persisted cache directory, i.e. /cache .
  15. BASE_EXPORT extern const char kPersistedCacheDirectoryPath[];
  16. // Services directory, i.e. /svc .
  17. BASE_EXPORT extern const char kServiceDirectoryPath[];
  18. // Package root directory, i.e. /pkg .
  19. BASE_EXPORT extern const char kPackageRootDirectoryPath[];
  20. // Returns fuchsia.io.Directory for the specified |path| or null InterfaceHandle
  21. // if the path doesn't exist or it's not a directory.
  22. BASE_EXPORT fidl::InterfaceHandle<::fuchsia::io::Directory> OpenDirectory(
  23. const base::FilePath& path);
  24. } // namespace fuchsia
  25. } // namespace base
  26. #endif // BASE_FUCHSIA_FILE_UTILS_H_