mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
Base: Write some initial man pages
It ain't much, but it's honest work!
This commit is contained in:
parent
36eea6c04b
commit
fed96f455d
Notes:
sideshowbarker
2024-07-19 11:57:24 +09:00
Author: https://github.com/bugaevc
Commit: fed96f455d
Pull-request: https://github.com/SerenityOS/serenity/pull/609
Reviewed-by: https://github.com/awesomekling ✅
8 changed files with 256 additions and 0 deletions
24
Base/usr/share/man/man2/access.md
Normal file
24
Base/usr/share/man/man2/access.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
## Name
|
||||
|
||||
access - check if a file is accessible
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <unistd.h>
|
||||
|
||||
int access(const char* path, int mode);
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Check if a file at the given *path* exists and is accessible to the current user for the given *mode*.
|
||||
Valid flags for *mode* are:
|
||||
* `F_OK` to check if the file is accessible at all,
|
||||
* `R_OK` to check if the file can be read,
|
||||
* `W_OK` to check if the file can be written to,
|
||||
* `X_OK` to check if the file can be executed as a program.
|
||||
|
||||
## Return value
|
||||
|
||||
If the file is indeed accessible for the specified *mode*, `access()` returns 0. Otherwise, it returns -1 and sets `errno` to describe the error.
|
Loading…
Add table
Add a link
Reference in a new issue