]> gitweb.factorcode.org Git - factor.git/blob - extra/io/unix/files/unique/unique.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / io / unix / files / unique / unique.factor
1 USING: kernel io.ports io.unix.backend math.bitfields
2 unix io.files.unique.backend system ;
3 IN: io.unix.files.unique
4
5 : open-unique-flags ( -- flags )
6     { O_RDWR O_CREAT O_EXCL } flags ;
7
8 M: unix (make-unique-file) ( path -- )
9     open-unique-flags file-mode open-file close-file ;
10
11 M: unix temporary-path ( -- path ) "/tmp" ;