2020-01-18 09:38:21 +01:00
|
|
|
/*
|
2022-04-29 20:54:43 +02:00
|
|
|
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
2021-05-09 17:09:30 +00:00
|
|
|
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
|
2020-01-18 09:38:21 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
|
2018-11-05 16:40:48 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2021-08-14 15:36:26 +02:00
|
|
|
#include <Kernel/API/POSIX/fcntl.h>
|
2022-05-02 15:26:10 -05:00
|
|
|
#include <Kernel/API/POSIX/sys/stat.h>
|
2022-08-16 01:57:43 +10:00
|
|
|
#include <sys/cdefs.h>
|
2018-11-05 16:40:48 +01:00
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
|
2022-04-30 00:58:50 +02:00
|
|
|
#define POSIX_FADV_DONTNEED 1
|
|
|
|
|
#define POSIX_FADV_NOREUSE 2
|
|
|
|
|
#define POSIX_FADV_NORMAL 3
|
|
|
|
|
#define POSIX_FADV_RANDOM 4
|
|
|
|
|
#define POSIX_FADV_SEQUENTIAL 5
|
|
|
|
|
#define POSIX_FADV_WILLNEED 6
|
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
int creat(char const* path, mode_t);
|
|
|
|
|
int open(char const* path, int options, ...);
|
|
|
|
|
int openat(int dirfd, char const* path, int options, ...);
|
2019-11-16 17:08:11 +01:00
|
|
|
|
2018-11-11 10:38:33 +01:00
|
|
|
int fcntl(int fd, int cmd, ...);
|
2021-05-09 17:09:30 +00:00
|
|
|
int create_inode_watcher(unsigned flags);
|
2022-04-01 20:58:27 +03:00
|
|
|
int inode_watcher_add_watch(int fd, char const* path, size_t path_length, unsigned event_mask);
|
2021-05-09 17:09:30 +00:00
|
|
|
int inode_watcher_remove_watch(int fd, int wd);
|
2018-11-11 10:38:33 +01:00
|
|
|
|
2022-04-29 20:54:43 +02:00
|
|
|
int posix_fadvise(int fd, off_t offset, off_t len, int advice);
|
2022-06-18 18:37:54 +02:00
|
|
|
int posix_fallocate(int fd, off_t offset, off_t len);
|
2022-04-29 20:54:43 +02:00
|
|
|
|
2022-05-02 15:26:10 -05:00
|
|
|
int utimensat(int dirfd, char const* path, struct timespec const times[2], int flag);
|
|
|
|
|
|
2018-11-05 16:40:48 +01:00
|
|
|
__END_DECLS
|