]> gitweb.factorcode.org Git - factor.git/blob - basis/io/files/links/unix/unix.factor
basis: removing unnecessary method stack effects.
[factor.git] / basis / io / files / links / unix / unix.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io.backend io.files io.files.links io.pathnames kernel
4 sequences system unix unix.ffi ;
5 IN: io.files.links.unix
6
7 M: unix make-link
8     normalize-path [ symlink ] unix-system-call drop ;
9
10 M: unix make-hard-link
11     normalize-path [ link ] unix-system-call drop ;
12
13 M: unix read-link
14     normalize-path read-symbolic-link ;
15
16 M: unix resolve-symlinks
17     path-components "/"
18     [ append-path dup exists? [ follow-links ] when ] reduce ;