@@ -10,40 +10,40 @@ defmodule File.Stat do
1010
1111 Its fields are:
1212
13- * `size` - Size of file in bytes.
13+ * `size` - size of file in bytes.
1414
15- * `type` - `:device`, ` :directory`, ` :regular`, ` :other`. The type of the
15+ * `type` - `:device | :directory | :regular | :other`; the type of the
1616 file.
1717
18- * `access` - `:read`, ` :write`, ` :read_write`, ` :none`. The current system
18+ * `access` - `:read | :write | :read_write | :none`; the current system
1919 access to the file.
2020
21- * `atime` - The last time the file was read.
21+ * `atime` - the last time the file was read.
2222
23- * `mtime` - The last time the file was written.
23+ * `mtime` - the last time the file was written.
2424
25- * `ctime` - The interpretation of this time field depends on the operating
25+ * `ctime` - the interpretation of this time field depends on the operating
2626 system. On Unix, it is the last time the file or the inode was changed.
27- In Windows, it is the create time.
27+ In Windows, it is the time of creation .
2828
29- * `mode` - The file permissions.
29+ * `mode` - the file permissions.
3030
31- * `links` - The number of links to this file. This is always 1 for file
31+ * `links` - the number of links to this file. This is always 1 for file
3232 systems which have no concept of links.
3333
34- * `major_device` - Identifies the file system where the file is located.
34+ * `major_device` - identifies the file system where the file is located.
3535 In windows, the number indicates a drive as follows: 0 means A:, 1 means
3636 B:, and so on.
3737
38- * `minor_device` - Only valid for character devices on Unix. In all other
38+ * `minor_device` - only valid for character devices on Unix. In all other
3939 cases, this field is zero.
4040
41- * `inode` - Gives the inode number. On non-Unix file systems, this field
41+ * `inode` - gives the inode number. On non-Unix file systems, this field
4242 will be zero.
4343
44- * `uid` - Indicates the owner of the file.
44+ * `uid` - indicates the owner of the file.
4545
46- * `gid` - Gives the group that the owner of the file belongs to. Will be
46+ * `gid` - gives the group that the owner of the file belongs to. Will be
4747 zero for non-Unix file systems.
4848
4949 The time type returned in `atime`, `mtime`, and `ctime` is dependent on the
@@ -280,13 +280,13 @@ defmodule File do
280280
281281 Typical error reasons are:
282282
283- * `:eacces` - Missing search or write permissions for the parent directories
284- of `path`.
285- * `:eexist` - There is already a file or directory named `path`.
286- * `:enoent` - A component of `path` does not exist.
287- * `:enospc` - There is a no space left on the device.
288- * `:enotdir` - A component of `path` is not a directory.
289- On some platforms, `:enoent` is returned instead.
283+ * `:eacces` - missing search or write permissions for the parent
284+ directories of `path`
285+ * `:eexist` - there is already a file or directory named `path`
286+ * `:enoent` - a component of `path` does not exist
287+ * `:enospc` - there is a no space left on the device
288+ * `:enotdir` - a component of `path` is not a directory;
289+ on some platforms, `:enoent` is returned instead
290290 """
291291 @ spec mkdir ( Path . t ) :: :ok | { :error , posix }
292292 def mkdir ( path ) do
@@ -312,10 +312,10 @@ defmodule File do
312312
313313 Typical error reasons are:
314314
315- * `:eacces` - Missing search or write permissions for the parent directories
316- of `path`.
317- * `:enospc` - There is a no space left on the device.
318- * `:enotdir` - A component of `path` is not a directory.
315+ * `:eacces` - missing search or write permissions for the parent
316+ directories of `path`
317+ * `:enospc` - there is a no space left on the device
318+ * `:enotdir` - a component of `path` is not a directory
319319 """
320320 @ spec mkdir_p ( Path . t ) :: :ok | { :error , posix }
321321 def mkdir_p ( path ) do
@@ -341,13 +341,13 @@ defmodule File do
341341
342342 Typical error reasons:
343343
344- * `:enoent` - The file does not exist.
345- * `:eacces` - Missing permission for reading the file,
346- or for searching one of the parent directories.
347- * `:eisdir` - The named file is a directory.
348- * `:enotdir` - A component of the file name is not a directory.
349- On some platforms, `:enoent` is returned instead.
350- * `:enomem` - There is not enough memory for the contents of the file.
344+ * `:enoent` - the file does not exist
345+ * `:eacces` - missing permission for reading the file,
346+ or for searching one of the parent directories
347+ * `:eisdir` - the named file is a directory
348+ * `:enotdir` - a component of the file name is not a directory;
349+ on some platforms, `:enoent` is returned instead
350+ * `:enomem` - there is not enough memory for the contents of the file
351351
352352 You can use `:file.format_error/1` to get a descriptive string of the error.
353353 """
@@ -381,8 +381,7 @@ defmodule File do
381381
382382 The accepted options are:
383383
384- * `:time` if the time should be `:local`, `:universal` or `:posix`.
385- Default is `:local`.
384+ * `:time` - `:local | :universal | :posix`; default: `:local`
386385
387386 """
388387 @ spec stat ( Path . t , stat_options ) :: { :ok , File.Stat . t } | { :error , posix }
@@ -728,13 +727,13 @@ defmodule File do
728727
729728 Typical error reasons are:
730729
731- * `:enoent` - A component of the file name does not exist.
732- * `:enotdir` - A component of the file name is not a directory.
733- On some platforms, enoent is returned instead.
734- * `:enospc` - There is a no space left on the device.
735- * `:eacces` - Missing permission for writing the file or searching one of the
736- parent directories.
737- * `:eisdir` - The named file is a directory.
730+ * `:enoent` - a component of the file name does not exist
731+ * `:enotdir` - a component of the file name is not a directory;
732+ on some platforms, enoent is returned instead
733+ * `:enospc` - there is a no space left on the device
734+ * `:eacces` - missing permission for writing the file or searching one of
735+ the parent directories
736+ * `:eisdir` - the named file is a directory
738737
739738 The writing is automatically done in `:raw` mode. Check
740739 `File.open/2` for other available options.
@@ -765,12 +764,12 @@ defmodule File do
765764
766765 Typical error reasons are:
767766
768- * `:enoent` - The file does not exist.
769- * `:eacces` - Missing permission for the file or one of its parents.
770- * `:eperm` - The file is a directory and user is not super-user.
771- * `:enotdir` - A component of the file name is not a directory.
772- On some platforms, enoent is returned instead.
773- * `:einval` - Filename had an improper type, such as tuple.
767+ * `:enoent` - the file does not exist
768+ * `:eacces` - missing permission for the file or one of its parents
769+ * `:eperm` - the file is a directory and user is not super-user
770+ * `:enotdir` - a component of the file name is not a directory;
771+ on some platforms, enoent is returned instead
772+ * `:einval` - filename had an improper type, such as tuple
774773
775774 ## Examples
776775
@@ -966,31 +965,31 @@ defmodule File do
966965
967966 The allowed modes:
968967
969- * `:read` - The file, which must exist, is opened for reading.
968+ * `:read` - the file, which must exist, is opened for reading.
970969
971- * `:write` - The file is opened for writing. It is created if it does not
970+ * `:write` - the file is opened for writing. It is created if it does not
972971 exist.
973972
974- If the file exists, and if write is not combined with read, the file will
975- be truncated.
973+ If the file does exists, and if write is not combined with read, the file
974+ will be truncated.
976975
977- * `:append` - The file will be opened for writing, and it will be created
976+ * `:append` - the file will be opened for writing, and it will be created
978977 if it does not exist. Every write operation to a file opened with append
979978 will take place at the end of the file.
980979
981- * `:exclusive` - The file, when opened for writing, is created if it does
980+ * `:exclusive` - the file, when opened for writing, is created if it does
982981 not exist. If the file exists, open will return `{:error, :eexist}`.
983982
984- * `:char_list` - When this term is given, read operations on the file will
985- return char lists rather than binaries;
983+ * `:char_list` - when this term is given, read operations on the file will
984+ return char lists rather than binaries.
986985
987- * `:compressed` - Makes it possible to read or write gzip compressed files.
986+ * `:compressed` - makes it possible to read or write gzip compressed files.
988987
989988 The compressed option must be combined with either read or write, but not
990989 both. Note that the file size obtained with `stat/1` will most probably
991990 not match the number of bytes that can be read from a compressed file.
992991
993- * `:utf8` - This option denotes how data is actually stored in the disk
992+ * `:utf8` - this option denotes how data is actually stored in the disk
994993 file and makes the file perform automatic translation of characters to
995994 and from utf-8.
996995
@@ -1004,7 +1003,7 @@ defmodule File do
10041003
10051004 This function returns:
10061005
1007- * `{:ok, io_device}` - The file has been opened in the requested mode.
1006+ * `{:ok, io_device}` - the file has been opened in the requested mode.
10081007
10091008 `io_device` is actually the pid of the process which handles the file.
10101009 This process is linked to the process which originally opened the file.
@@ -1014,7 +1013,7 @@ defmodule File do
10141013 An `io_device` returned from this call can be used as an argument to the
10151014 `IO` module functions.
10161015
1017- * `{:error, reason}` - The file could not be opened.
1016+ * `{:error, reason}` - the file could not be opened.
10181017
10191018 ## Examples
10201019
0 commit comments