kiwi icon indicating copy to clipboard operation
kiwi copied to clipboard

Feature - Builtin Methods - CanRead, CanWrite, GetPermissions, SetPermissions

Open fuseraft opened this issue 5 months ago • 1 comments

CanRead/CanWrite returns false if the path does not exist. It returns a boolean value indicating read/write access, depending on the method. It will not throw an exception.

fn read(path)
  return "" when !fs::readable(path) # or `fs::can_read(path)`, etc
  return fs::read(path)
end

Will need to put more thought into GetPermissions/SetPermissions

perms = fs::get_perms(file)
fs::set_perms(file, bitmask)

std::filesystem::permissions

fuseraft avatar Sep 05 '24 16:09 fuseraft