Thread overview
why mkdir can't create tree of dirs?
Feb 09, 2016
Suliman
Feb 09, 2016
anonymous
Feb 10, 2016
Kagamin
Feb 09, 2016
Wyatt
Feb 09, 2016
Jonathan M Davis
Feb 10, 2016
Suliman
February 09, 2016
It's look like that I can only create one nesting level sub folder, for example there is exists dir: D:\foo
I can't create dir D:\foo\bar\baz I can only create D:\foo\bar

D:\foo\bar

Is it's rational limit or it is bug? Here is error when I tried to folder in folder thet do not exists.

It's not very handy to write all levels by hands...

td.windows.syserror.WindowsException@C:\D\dmd2\windows\bin\..\..\src\phobos\stdfile.d(2048): F:\foo\imgs_projected\jma_vis\1602\123: ╨б╨╕╤Б╤В╨╡╨╝╨╡ ╨╜╨╡ ╤Г╨┤╨╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╨┐╤Г╤В╤М. (error 3)
February 09, 2016
On Tuesday, 9 February 2016 at 20:20:59 UTC, Suliman wrote:
> It's look like that I can only create one nesting level sub folder, for example there is exists dir: D:\foo
> I can't create dir D:\foo\bar\baz I can only create D:\foo\bar

http://dlang.org/phobos/std_file.html#.mkdirRecurse

> td.windows.syserror.WindowsException@C:\D\dmd2\windows\bin\..\..\src\phobos\stdfile.d(2048): F:\foo\imgs_projected\jma_vis\1602\123: ╨б╨╕╤Б╤В╨╡╨╝╨╡ ╨╜╨╡ ╤Г╨┤╨╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╨┐╤Г╤В╤М. (error 3)

What's up with that garbled text?
February 09, 2016
On Tuesday, 9 February 2016 at 20:20:59 UTC, Suliman wrote:
> It's look like that I can only create one nesting level sub folder, for example there is exists dir: D:\foo
> I can't create dir D:\foo\bar\baz I can only create D:\foo\bar

http://dlang.org/phobos/std_file.html#.mkdirRecurse

-Wyatt
February 09, 2016
On Tuesday, February 09, 2016 20:20:59 Suliman via Digitalmars-d-learn wrote:
> It's look like that I can only create one nesting level sub
> folder, for example there is exists dir: D:\foo
> I can't create dir D:\foo\bar\baz I can only create D:\foo\bar
>
> D:\foo\bar
>
> Is it's rational limit or it is bug? Here is error when I tried to folder in folder thet do not exists.
>
> It's not very handy to write all levels by hands...
>
> td.windows.syserror.WindowsException@C:\D\dmd2\windows\bin\..\..\src\phobos\stdfile.d(2048): F:\foo\imgs_projected\jma_vis\1602\123: ╨б╨╕╤Б╤В╨╡╨╝╨╡ ╨╜╨╡ ╤Г╨┤╨╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╨┐╤Г╤В╤М. (error 3)

You can use std.file.mkdirRecurse instead of std.file.mkdir. std.file.mkdirRecurse is similar to mkdir -p like std.file.mkdir is similar to mkdir.

- Jonathan M Davis

February 10, 2016
On Tuesday, 9 February 2016 at 21:03:34 UTC, anonymous wrote:
> What's up with that garbled text?

https://issues.dlang.org/show_bug.cgi?id=2742
February 10, 2016
On Tuesday, 9 February 2016 at 23:23:10 UTC, Jonathan M Davis wrote:
> On Tuesday, February 09, 2016 20:20:59 Suliman via Digitalmars-d-learn wrote:
>> It's look like that I can only create one nesting level sub
>> folder, for example there is exists dir: D:\foo
>> I can't create dir D:\foo\bar\baz I can only create D:\foo\bar
>>
>> D:\foo\bar
>>
>> Is it's rational limit or it is bug? Here is error when I tried to folder in folder thet do not exists.
>>
>> It's not very handy to write all levels by hands...
>>
>> td.windows.syserror.WindowsException@C:\D\dmd2\windows\bin\..\..\src\phobos\stdfile.d(2048): F:\foo\imgs_projected\jma_vis\1602\123: ╨б╨╕╤Б╤В╨╡╨╝╨╡ ╨╜╨╡ ╤Г╨┤╨╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╨┐╤Г╤В╤М. (error 3)
>
> You can use std.file.mkdirRecurse instead of std.file.mkdir. std.file.mkdirRecurse is similar to mkdir -p like std.file.mkdir is similar to mkdir.
>
> - Jonathan M Davis

What profit to split it's in two functions? Why mkdir can't work in recursive mode?