Thread overview |
---|
February 09, 2016 why mkdir can't create tree of dirs? | ||||
---|---|---|---|---|
| ||||
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 Re: why mkdir can't create tree of dirs? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | 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 Re: why mkdir can't create tree of dirs? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | 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 Re: why mkdir can't create tree of dirs? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | 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 Re: why mkdir can't create tree of dirs? | ||||
---|---|---|---|---|
| ||||
Posted in reply to anonymous | 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 Re: why mkdir can't create tree of dirs? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | 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?
|
Copyright © 1999-2021 by the D Language Foundation