November 27, 2006 createPath() | ||||
---|---|---|---|---|
| ||||
I wrote this function to create any number of nesting directories all at once with one directory path. Someone needed it so I'm releasing it: http://paste.dprogramming.com/dpqr1tya.php Would be handy to add to std.file |
December 09, 2006 Update and problem with std.path.isabs() - Re: createPath() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Miller | Updated how it handles network share paths: http://paste.dprogramming.com/dpilny6l.php After testing with network shares I realized that std.path.isabs() should probably test for network share paths and consider them absolute. Consider the following, which I often do: if(!std.path.isabs(mypath)) mypath = std.path.join(getcwd(), mypath); where mypath is `\\foo\bar` Fix for isabs: version(Windows) { if(path.length >= 2 && r"\\" == path[0 .. 2]) return true; } // ..continue with existing code.. |
Copyright © 1999-2021 by the D Language Foundation