-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
The accessability differ between files and directories (in a unix permission environment).
A file is accessable if it is readable.
A directory is accessable if it is executeable and readable (for content listing).
How about add a convenience method File::isAccessable:
class File::isAccessable {
public function isAccessable() {
if ($this->isFile()) {
return $this->isReadable();
}
else if ($this->isDirectory()) {
return $this->isExecuteable() && $this->isReadable();
}
}
}According to #49 this may be extracted to the permission interface, to allow the permission manager check the accessablility.
Reactions are currently unavailable