factor/basis/io/unix/files/unique/unique.factor

14 lines
419 B
Factor
Raw Normal View History

2008-10-06 18:17:14 -04:00
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
2008-09-05 20:29:14 -04:00
USING: kernel io.ports io.unix.backend math.bitwise
2008-04-02 21:09:56 -04:00
unix io.files.unique.backend system ;
IN: io.unix.files.unique
: open-unique-flags ( -- flags )
{ O_RDWR O_CREAT O_EXCL } flags ;
2008-04-02 21:09:56 -04:00
M: unix (make-unique-file) ( path -- )
2008-05-14 07:08:57 -04:00
open-unique-flags file-mode open-file close-file ;
2008-04-02 21:09:56 -04:00
M: unix temporary-path ( -- path ) "/tmp" ;