September 2017
Beginner
402 pages
9h 52m
English
The IO role offers a number of one-letter methods to check different metrics of the files and directories. The return values are Boolean. The methods are listed in the following table:
| Method | Description |
| e | Checks if a path exists |
| d | Checks if the path is an existing directory |
| f | Checks if the path is an existing file |
| l | Checks if the path is a symbolic link |
| r | Checks if the path is accessible (thus, the read bit is set) |
| w | Checks if the path is writable (the write bit is set) |
| x | Checks if the path is executable (the exec bit is set) |
| rw | Checks if the path is available for both reading and writing |
| rwx | Checks if all the r, w, and x bits are set for the path |
| s | Checks if the file is non-empty ... |
Read now
Unlock full access