mirror of
https://github.com/janet-lang/janet
synced 2026-09-20 00:00:41 +00:00
Update os/stat
os/stat can now take a keyword as the second argument to avoid creating a table if one only wants on value from stat.
This commit is contained in:
+6
-4
@@ -18,11 +18,13 @@
|
||||
(os/exit res)))
|
||||
|
||||
(defn- rm
|
||||
"Remove a directory. Not safe for user code."
|
||||
"Remove a directory and all sub directories."
|
||||
[path]
|
||||
(if is-win
|
||||
(shell "rmdir " path " /s")
|
||||
(shell "rm -rf " path)))
|
||||
(if (= ((os/stat path) :mode) :directory)
|
||||
(do
|
||||
(each subpath (os/dir path) (rm subpath))
|
||||
(os/rmdir path))
|
||||
(os/rm path)))
|
||||
|
||||
(defn- needs-build
|
||||
[dest src]
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@
|
||||
"Generate title"
|
||||
[]
|
||||
(string "<h1>Janet Core API</h1>"
|
||||
"<p>Version " janet/version "-" janet/build "</p>"
|
||||
"<p>Version " janet/version "-" janet/build "</p>"
|
||||
"<p>Generated "
|
||||
(nice-date)
|
||||
"</p>"
|
||||
|
||||
Reference in New Issue
Block a user