blob: 0bad8e2c6e5ec02058a59d3cb682b58715f57998 [file] [log] [blame]
Luis Hector Chavez21a249e2017-07-26 17:38:05 +00001// Copyright 2013 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_ANDROID_FIFO_UTILS_H_
6#define BASE_ANDROID_FIFO_UTILS_H_
7
8#include <stdio.h>
9
10#include "base/base_export.h"
11
12namespace base {
13
14class FilePath;
15
16namespace android {
17
18// Creates a fifo at the given |path| with POSIX permissions set to |mode|,
19// returning true if it was successfully created and permissions were set.
20BASE_EXPORT bool CreateFIFO(const FilePath& path, int mode);
21
22// Redirects the |stream| to the file provided by |path| with |mode|
23// permissions, returning true if successful.
24BASE_EXPORT bool RedirectStream(FILE* stream,
25 const FilePath& path,
26 const char* mode);
27
28} // namespace android
29} // namespace base
30
31#endif // BASE_ANDROID_FIFO_UTILS_H_