Bits and Pieces
So far we’ve mentioned most of the functions that I use on a day-to-day basis for manipulating files. The topics listed next are not discussed here; details can be found in the manual pages.
- File modes
-
When we open a file with
file:open, we open the file in a particular mode or a combination of modes. There are actually many more modes than we might think; for example, it’s possible to read and write gzip-compressed files with thecompressedmode flag, and so on. The full list is in the manual pages. - Modification times, groups, symlinks
-
We can set all of these with routines in
file. - Error codes
-
I’ve rather blandly said that all errors are of the form
{error, Why}; in fact,Whyis an atom (for example,enoentmeans a file does not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access