aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMichael Santos <[email protected]>2010-04-30 12:22:11 -0400
committerRaimo Niskanen <[email protected]>2010-06-04 10:47:56 +0200
commit4bd026cccb2c22279dd9c88e704642c5a65d3c53 (patch)
tree5c801bf9813b575eb302039f78b07b50364b6696 /bin
parentcbd1378ee1fde835e55614bac9290b281bafe49a (diff)
downloadotp-4bd026cccb2c22279dd9c88e704642c5a65d3c53.tar.gz
otp-4bd026cccb2c22279dd9c88e704642c5a65d3c53.tar.bz2
otp-4bd026cccb2c22279dd9c88e704642c5a65d3c53.zip
Support opening files in exclusive mode
Add an option that atomically tests for the existence of a file and creates it if the file does not exist, by passing the O_EXCL flag to open() on Unix and CREATE_NEW flag on Windows. Support for O_EXCL varies across platforms and filesystems. {ok, Fd} = file:open("/tmp/foo", [write,exclusive]), {error, eexist} = file:open("/tmp/foo", [write,exclusive]).
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions