]> gitweb.factorcode.org Git - factor.git/blob - basis/io/unix/files/unique/unique.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / basis / io / unix / files / unique / unique.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel io.ports io.unix.backend math.bitwise
4 unix system io.files.unique ;
5 IN: io.unix.files.unique
6
7 : open-unique-flags ( -- flags )
8     { O_RDWR O_CREAT O_EXCL } flags ;
9
10 M: unix touch-unique-file ( path -- )
11     open-unique-flags file-mode open-file close-file ;
12
13 M: unix temporary-path ( -- path ) "/tmp" ;