fs
This commit is contained in:
parent
a4ceebe209
commit
246de627aa
1 changed files with 50 additions and 0 deletions
50
src/babashka/impl/fs.clj
Normal file
50
src/babashka/impl/fs.clj
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
(ns babashka.impl.fs
|
||||||
|
(:require [babashka.fs :as fs]
|
||||||
|
[sci.core :as sci]))
|
||||||
|
|
||||||
|
(def fns (sci/create-ns 'babashka.fs nil))
|
||||||
|
|
||||||
|
#_(doseq [k (sort (keys (ns-publics 'babashka.fs)))]
|
||||||
|
(println (str "'" k) (format "(sci/copy-var fs/%s fns)" k)))
|
||||||
|
|
||||||
|
(def fs-namespace
|
||||||
|
{'absolute? (sci/copy-var fs/absolute? fns)
|
||||||
|
'absolutize (sci/copy-var fs/absolutize fns)
|
||||||
|
'components (sci/copy-var fs/components fns)
|
||||||
|
'copy (sci/copy-var fs/copy fns)
|
||||||
|
'copy-tree (sci/copy-var fs/copy-tree fns)
|
||||||
|
'create-dir (sci/copy-var fs/create-dir fns)
|
||||||
|
'create-dirs (sci/copy-var fs/create-dirs fns)
|
||||||
|
'create-sym-link (sci/copy-var fs/create-sym-link fns)
|
||||||
|
'create-temp-dir (sci/copy-var fs/create-temp-dir fns)
|
||||||
|
'delete (sci/copy-var fs/delete fns)
|
||||||
|
'delete-if-exists (sci/copy-var fs/delete-if-exists fns)
|
||||||
|
'delete-on-exit (sci/copy-var fs/delete-on-exit fns)
|
||||||
|
'delete-tree (sci/copy-var fs/delete-tree fns)
|
||||||
|
'directory-stream (sci/copy-var fs/directory-stream fns)
|
||||||
|
'directory? (sci/copy-var fs/directory? fns)
|
||||||
|
'executable? (sci/copy-var fs/executable? fns)
|
||||||
|
'exists? (sci/copy-var fs/exists? fns)
|
||||||
|
'file (sci/copy-var fs/file fns)
|
||||||
|
'file-name (sci/copy-var fs/file-name fns)
|
||||||
|
'file-separator (sci/copy-var fs/file-separator fns)
|
||||||
|
'glob (sci/copy-var fs/glob fns)
|
||||||
|
'hidden? (sci/copy-var fs/hidden? fns)
|
||||||
|
'last-modified (sci/copy-var fs/last-modified fns)
|
||||||
|
'list-dir (sci/copy-var fs/list-dir fns)
|
||||||
|
'move (sci/copy-var fs/move fns)
|
||||||
|
'normalize (sci/copy-var fs/normalize fns)
|
||||||
|
'parent (sci/copy-var fs/parent fns)
|
||||||
|
'path (sci/copy-var fs/path fns)
|
||||||
|
'path-separator (sci/copy-var fs/path-separator fns)
|
||||||
|
'posix->str (sci/copy-var fs/posix->str fns)
|
||||||
|
'posix-file-permissions (sci/copy-var fs/posix-file-permissions fns)
|
||||||
|
'readable? (sci/copy-var fs/readable? fns)
|
||||||
|
'real-path (sci/copy-var fs/real-path fns)
|
||||||
|
'relative? (sci/copy-var fs/relative? fns)
|
||||||
|
'relativize (sci/copy-var fs/relativize fns)
|
||||||
|
'set-posix-file-permissions (sci/copy-var fs/set-posix-file-permissions fns)
|
||||||
|
'size (sci/copy-var fs/size fns)
|
||||||
|
'str->posix (sci/copy-var fs/str->posix fns)
|
||||||
|
'walk-file-tree (sci/copy-var fs/walk-file-tree fns)
|
||||||
|
'writable? (sci/copy-var fs/writable? fns)})
|
||||||
Loading…
Reference in a new issue