2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
// author: Max Kellermann <max.kellermann@gmail.com>
|
2018-08-21 18:16:52 +02:00
|
|
|
|
|
|
|
#ifndef OPEN_HXX
|
|
|
|
#define OPEN_HXX
|
|
|
|
|
|
|
|
class FileDescriptor;
|
|
|
|
class UniqueFileDescriptor;
|
|
|
|
|
|
|
|
UniqueFileDescriptor
|
2020-04-30 21:30:57 +02:00
|
|
|
OpenReadOnly(const char *path, int flags=0);
|
2018-08-21 18:16:52 +02:00
|
|
|
|
2019-02-19 12:16:41 +01:00
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenWriteOnly(const char *path, int flags=0);
|
|
|
|
|
|
|
|
#ifndef _WIN32
|
|
|
|
|
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenDirectory(const char *name, int flags=0);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2018-08-21 18:16:52 +02:00
|
|
|
#ifdef __linux__
|
|
|
|
|
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenPath(const char *path, int flags=0);
|
|
|
|
|
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenPath(FileDescriptor directory, const char *name, int flags=0);
|
|
|
|
|
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenReadOnly(FileDescriptor directory, const char *name, int flags=0);
|
|
|
|
|
2019-02-19 12:16:41 +01:00
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenWriteOnly(FileDescriptor directory, const char *name, int flags=0);
|
|
|
|
|
2018-08-21 18:16:52 +02:00
|
|
|
UniqueFileDescriptor
|
|
|
|
OpenDirectory(FileDescriptor directory, const char *name, int flags=0);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|