summaryrefslogtreecommitdiffhomepage
path: root/vm.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-15 16:01:42 +0200
committerJo-Philipp Wich <jo@mein.io>2021-05-15 16:01:42 +0200
commitdfb73798cf0364f13f7c32d468de476b3a6b56bf (patch)
tree6c50e73385bf3f5eae61f31461bf85362626a75b /vm.c
parent1ddf5b68fa60736c1dd9ffda5eba09bbd90309e1 (diff)
fs: implement chmod(), chown(), rename() and glob() functions
- The chmod() function expects a path string as first and an integer mode value as second argument. - The chown() function takes a path string as first argument, and either a string, an integer or null as second user and third group argument respectively. If either user or group are given as string, they're resolved to an uid/gid using getpwnam()/getgrnam() internally. If either lookup fails, the ownership change is not performed. If either user or group are null or -1, they're left unchanged. - The rename() function takes two path strings, the old path being the first argument and the new path the second one. - The glob() function takes an arbitrary number of glob patterns and resolves matching files for each one. In case of multiple patterns, no efforts are made to remove duplicates or to globally sort the combined match list. The list of matches for each individual pattern is sorted. Returns an array containing all matched file paths. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'vm.c')
0 files changed, 0 insertions, 0 deletions