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.
5 #ifndef BASE_FUCHSIA_FILE_UTILS_H_
6 #define BASE_FUCHSIA_FILE_UTILS_H_
8 #include <lib/zx/handle.h>
10 #include "base/base_export.h"
18 // Gets a Zircon handle from a file or directory |path| in the process'
20 BASE_EXPORT zx::handle GetHandleFromFile(base::File file);
22 // Makes a File object from a Zircon handle.
23 // Returns an empty File if |handle| is invalid or not a valid PA_FDIO_REMOTE
25 BASE_EXPORT base::File GetFileFromHandle(zx::handle handle);
27 } // namespace fuchsia
30 #endif // BASE_FUCHSIA_FILE_UTILS_H_