AFAIK out doesn't do auto dir creation or any dir creation for that matter.

Looks good but the cd thing should not be necessary, just use the absolute
path in the last call.

Note that you can use info to check stuff, could possibly be used in a
function that checks a certain path from top to bottom and creates any
missing dirs on the way. Ie if new exists it will create dir.


On Mon, Jul 23, 2012 at 10:15 PM, Thorsten Jolitz <tjol...@googlemail.com>wrote:

> Alexander Burger <a...@software-lab.de> writes:
>
> > For making files where you will usually use 'out', and write directly to
> > the file.
> >
> > To concat two files, you could do:
> >
> >    (out "c" (in "a" (echo)) (in "b" (echo)))
> >
> > Erasing a file is not implemented as a PicoLisp function. You can simply
> > call 'rm'
> >
> >    (call 'rm "c")
>
> Is there a way to make 'out' write directories too?
>
> ,---------------------------------------------------------
> | (out "/new/dir/newfile" (in "a" (echo)) (in "b" (echo)))
> `---------------------------------------------------------
>
> (This doesn't work for me)
>
> Or do I have to use something like
>
> ,--------------------------
> | (call 'mkdir "/new/dir/")
> `--------------------------
>
> then
>
> ,-----------------------
> | (call 'cd "/new/dir/")
> `-----------------------
>
> then
>
> ,------------------------------------------------
> | (out "newfile" (in "a" (echo)) (in "b" (echo))) |
> `------------------------------------------------
>
> ?
>
> --
> cheers,
> Thorsten
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to