Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -0,0 +1 @@
(ensure-directories-exist "your/path/name")

View file

@ -0,0 +1 @@
File.mkdir_p("./path/to/dir")

View file

@ -0,0 +1,7 @@
import System.Directory (createDirectory, setCurrentDirectory)
import Data.List.Split (splitOn)
main :: IO ()
main = do
let path = splitOn "/" "path/to/dir"
mapM_ (\x -> createDirectory x >> setCurrentDirectory x) path

View file

@ -0,0 +1,2 @@
require 'general/dirutils'
pathcreate '/tmp/some/path/to/dir'

View file

@ -0,0 +1,17 @@
pathcreate=: monad define
todir=. termsep_j_ jpathsep y
todirs=. }. ,each /\ <;.2 todir NB. base dirs
msk=. -.direxist todirs NB. 1 for each non-existing dir
msk=. 0 (i. msk i: 0)}msk
dircreate msk#todirs NB. create non-existing base dirs
)
dircreate=: monad define
y=. boxxopen y
msk=. -.direxist y
if. ''-:$msk do. msk=. (#y)#msk end.
res=. 1!:5 msk#y
msk #inv ,res
)
direxist=: 2 = ftype&>@:boxopen

View file

@ -1 +1 @@
mkdir 'path/to/dir'
mkpath 'path/to/dir'

View file

@ -0,0 +1,3 @@
use File::Path qw(make_path);
make_path('path/to/dir')

View file

@ -0,0 +1,7 @@
$ include "seed7_05.s7i";
include "cli_cmds.s7i";
const proc: main is func
begin
doMkdirCmd(argv(PROGRAM), TRUE);
end func;

View file

@ -0,0 +1,10 @@
$ include "seed7_05.s7i";
include "cli_cmds.s7i";
const proc: main is func
local
var string: parameters is "";
begin
parameters := join(argv(PROGRAM), " ");
doMkdir(parameters);
end func;