We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@see #60 (comment)
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:
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.
The text was updated successfully, but these errors were encountered:
What is the behavior in unix for:
Without the answers for mentioned questions my current point would be to let be "isReadable" and "isExecuteable" to be synonymous for directories.
Sorry, something went wrong.
Directories that are only readable are not accessable -> false Directories that are only executeable can be accessed, but not readed -> false
In other word, isAccessable will only return true if the target can be read. For directories this means, it have also be executeable.
isAccessable
true
IMO we should drop this method altogether in favor of:
class File { public function isListable() { if ($this->isFile()) { return false; } else if ($this->isDirectory()) { return $this->isExecuteable() && $this->isReadable(); } } }
tristanlins
No branches or pull requests
@see #60 (comment)
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
:According to #49 this may be extracted to the permission interface, to allow the permission manager check the accessablility.
The text was updated successfully, but these errors were encountered: