Liking cljdoc? Tell your friends :D

std.fs.api


copyclj

(copy source target)
(copy source target opts)

copies all specified files from one to another

(copy "src" ".src" {:include [".clj"]}) => map?

(delete ".src")

copies all specified files from one to another

(copy "src" ".src" {:include [".clj"]})
=> map?

(delete ".src")
raw docstring

copy-intoclj

(copy-into source target)
(copy-into source target opts)

copies a single file to a destination

(copy-into "src/std/fs.clj" "test-scratch/std.fs") => vector?

(delete "test-scratch/std.fs")

copies a single file to a destination

(copy-into "src/std/fs.clj"
           "test-scratch/std.fs")
=> vector?

(delete "test-scratch/std.fs")
raw docstring

copy-singleclj

(copy-single source target)
(copy-single source target opts)

copies a single file to a destination

(copy-single "project.clj" "test-scratch/project.clj.bak" {:options #{:replace-existing}}) => (path/path "." "test-scratch/project.clj.bak")

(delete "test-scratch/project.clj.bak")

copies a single file to a destination

(copy-single "project.clj"
             "test-scratch/project.clj.bak"
             {:options #{:replace-existing}})
=> (path/path "." "test-scratch/project.clj.bak")

(delete "test-scratch/project.clj.bak")
raw docstring

create-directoryclj

(create-directory path)
(create-directory path attrs)

creates a directory on the filesystem

(do (create-directory "test-scratch/.hello/.world/.foo") (path/directory? "test-scratch/.hello/.world/.foo")) => true

(delete "test-scratch/.hello")

creates a directory on the filesystem

(do (create-directory "test-scratch/.hello/.world/.foo")
    (path/directory? "test-scratch/.hello/.world/.foo"))
=> true

(delete "test-scratch/.hello")
raw docstring

(create-symlink path link-to)
(create-symlink path link-to attrs)

creates a symlink to another file

(do (create-symlink "test-scratch/project.lnk" "project.clj") (path/link? "test-scratch/project.lnk")) => true

creates a symlink to another file

(do (create-symlink "test-scratch/project.lnk" "project.clj")
    (path/link? "test-scratch/project.lnk"))
=> true
raw docstring

create-tmpdirclj

(create-tmpdir)
(create-tmpdir prefix)

creates a temp directory on the filesystem

(create-tmpdir) ;;=> #path:"/var/folders/d6/yrjldmsd4jd1h0nm970wmzl40000gn/T/4870108199331749225"

creates a temp directory on the filesystem

(create-tmpdir)
;;=> #path:"/var/folders/d6/yrjldmsd4jd1h0nm970wmzl40000gn/T/4870108199331749225"
raw docstring

create-tmpfileclj

(create-tmpfile)
(create-tmpfile contents)

creates a tempory file

(create-tmpfile) ;;#file:"/var/folders/rc/4nxjl26j50gffnkgm65ll8gr0000gp/T/tmp2270822955686495575" => java.io.File

creates a tempory file

(create-tmpfile)
;;#file:"/var/folders/rc/4nxjl26j50gffnkgm65ll8gr0000gp/T/tmp2270822955686495575"
=> java.io.File
raw docstring

deleteclj

(delete root)
(delete root opts)

copies all specified files from one to another

(do (copy "src/std/fs.clj" ".src/std/fs.clj") (delete ".src" {:include ["fs.clj"]})) => #{(str (path/path ".src/std/fs.clj"))}

(delete ".src") => set?

copies all specified files from one to another

(do (copy "src/std/fs.clj" ".src/std/fs.clj")
    (delete ".src" {:include ["fs.clj"]}))
=> #{(str (path/path ".src/std/fs.clj"))}

(delete ".src")
=> set?
raw docstring

listclj

(list root)
(list root opts)

lists the files and attributes for a given directory

(list "src")

(list "../hara/src/std/fs" {:recursive true})

lists the files and attributes for a given directory

(list "src")

(list "../hara/src/std/fs" {:recursive true})
raw docstring

moveclj

(move source target)
(move source target opts)

moves a file or directory

(do (move "shortlist" ".shortlist") (move ".shortlist" "shortlist"))

(move ".non-existent" ".moved") => {}

moves a file or directory

(do (move "shortlist" ".shortlist")
    (move ".shortlist" "shortlist"))

(move ".non-existent" ".moved")
=> {}
raw docstring

selectclj

(select root)
(select root opts)

selects all the files in a directory

(->> (select "src/std/fs") (map #(path/relativize "std/fs" %)) (map str) (sort))

selects all the files in a directory

(->> (select "src/std/fs")
     (map #(path/relativize "std/fs" %))
    (map str)
     (sort))
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close