diff options
author | Dimitris Zlatanidis <d.zlatanidis@gmail.com> | 2018-07-01 08:39:22 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-07-07 06:54:12 +0700 |
commit | 1ac48efe18876552e2713065b64bb4fcc8e64183 (patch) | |
tree | 533b4e1fa2b2465b48c385571b763f1e805a3d7c /python/atomicwrites/README | |
parent | d0c7c2501666e78cbf09df79348cf8c8b335fafb (diff) | |
download | slackbuilds-1ac48efe18876552e2713065b64bb4fcc8e64183.tar.gz |
python/atomicwrites: Added (Python library for atomic file writes).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/atomicwrites/README')
-rw-r--r-- | python/atomicwrites/README | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/python/atomicwrites/README b/python/atomicwrites/README new file mode 100644 index 0000000000..2602e9896f --- /dev/null +++ b/python/atomicwrites/README @@ -0,0 +1,15 @@ +It uses a temporary file in the same directory as the given path. This ensures +that the temporary file resides on the same filesystem. + +The temporary file will then be atomically moved to the target location: On +POSIX, it will use rename if files should be overwritten, otherwise a +combination of link and unlink. On Windows, it uses MoveFileEx through +stdlib’s ctypes with the appropriate flags. + +Note that with link and unlink, there’s a timewindow where the file might be +available under two entries in the filesystem: The name of the temporary file, +and the name of the target file. + +Also note that the permissions of the target file may change this way. In some +situations a chmod can be issued without any concurrency problems, but since +that is not always the case, this library doesn’t do it by itself. |