openfile 0.1.2
Opening std.stdio.File using a set of symbolic constants as a file access mode
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
OpenFile
OpenFile library provides functions for opening std.stdio.File using a set of symbolic constants instead of C-style string as a file access mode. This approach allows setting a file access mode which is not possible or non-portable to express via string literals. E.g. an exclusive mode which atomically ensures that the file does not exist upon creating. Also someone might just prefer symbolic constants over string literals.
import openfile;
// Open a file in write mod and ensure that this is a new file with such name
// avoiding an accidental change of data written by some other process and ensuring that no other file with such name exists at the time of opening.
File f = openFile("test.txt", OpenMode.createNew);
- Registered by Roman Chistokhodov
- 0.1.2 released 4 years ago
- FreeSlave/openfile
- BSL-1.0
- Copyright © 2020, Roman Chistokhodov
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.2 2020-Sep-08 0.1.1 2020-Sep-08 0.1.0 2020-Sep-07 ~master 2021-Jun-09 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
13 downloads total
-
- Score:
- 0.6
- Short URL:
- openfile.dub.pm