![]() |
Phasor 2.2.0
Stack VM based Programming Language
|
#include <stdint.h>#include <stdbool.h>#include <sys/types.h>Go to the source code of this file.
Functions | |
| bool | file_set_properties (char *path, char param, int64_t epoch) |
| Set file metadata time property. | |
| int64_t | file_get_properties (char *path, char param) |
| Get file metadata time property. | |
| nlink_t | file_get_links_count (const char *path) |
| Retrieves the number of hard links to a file. | |
| bool | file_get_owner_id (const char *path, uid_t *uid, gid_t *gid) |
| Retrieves the owner identifier of a file. | |
| nlink_t file_get_links_count | ( | const char * | path | ) |
Retrieves the number of hard links to a file.
This function returns the count of hard links associated with the specified file. On POSIX systems, it uses stat to get st_nlink. On Windows, it uses GetFileInformationByHandle to obtain nNumberOfLinks.
| path | The path to the file. |
Definition at line 91 of file file_properties.c.
| bool file_get_owner_id | ( | const char * | path, |
| uid_t * | uid, | ||
| gid_t * | gid ) |
Retrieves the owner identifier of a file.
On POSIX systems, this sets *uid to the file owner's UID and *gid to the file owner's GID. On Windows, there is no direct UID/GID, but a numeric representation of the owner SID is assigned to *uid and *gid is set to 0.
| path | The path to the file. |
| uid | Pointer to a variable that receives the owner's UID. |
| gid | Pointer to a variable that receives the owner's GID. |
Definition at line 117 of file file_properties.c.
| int64_t file_get_properties | ( | char * | path, |
| char | param ) |
Get file metadata time property.
| path | Path to file |
| param | What to get a=Access c=Creation m=Modified |
Definition at line 62 of file file_properties.c.
| bool file_set_properties | ( | char * | path, |
| char | param, | ||
| int64_t | epoch ) |
Set file metadata time property.
| path | Path to file |
| param | What to change a=Access c=Creation m=Modified |
| epoch | Epoch time to set |
Definition at line 20 of file file_properties.c.