![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Mkdir and several directories at once... Topic Summary: Created On: 23-Jun-2005 07:58 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: As ever, Tony has the best solutions! Fixed a small recursive problem... | |||
![]() |
|||
Hello all,
from the reference manual: void mkdir(string dirName) Operation Creates directory dirName. Optional argument osParm can contain information that is dependent on the operating system, such as the UNIX octal file access mask. Example The following example creates a typical UNIX path name, and sets the access rights: mkdir("/usr/development/phase1", "0755") The following example creates a Windows path, for which there are no access rights: mkdir("C:\\DOORS\\DXLExample\\", "") gives the following message:.... -R-E- DXL: <Line:1> mkdir fails: No such file or directory C:\DOORS\DXLExample -I- DXL: execution halted creating a single directory works... Does anybody have a solution for this? Edwin Buisman Edited: 23-Jun-2005 at 08:41 by Edwin Buisman |
|||
![]() |
|||
![]() |
|||
I'm not clear what you are saying the problem is, but all the directories in the path must exist for the create to work. You can't create a path.
|
|||
![]() |
|||
![]() |
|||
This is what I found as well, but that means that I must parse the directory string. I hoped the function mkdir was intelligent... (As it stated in the reference manual...)
Edited: 23-Jun-2005 at 08:47 by Edwin Buisman |
|||
![]() |
|||
![]() |
|||
Edwin,
I couldn't resist having a go at this one, seemed so useful to have. The attached implements a wrapper for mkdir. string makeDir(string dirName) which allows you to create a whole new directory path, not just a single directory. It also traps errors for you. I have tested this, but suggest you test some more. Interestingly, while testing this I noticed that miss off the drive letter and DOROS assumes it is drive C:. makeDir("\\Temp\\newDirectory") worksexactly the same as makeDir("C:\\Temp\\newDirectory")
------------------------- Tony Goodman http://www.smartdxl.com |
|||
![]() |
|||
![]() |
|||
As ever, Tony has the best solutions! Fixed a small recursive problem...
|
|||
![]() |
|||
![]() |
|||
Thankyou for the fix Edwin. Two heads are always better than one!
------------------------- Tony Goodman http://www.smartdxl.com |
|||
![]() |
Telelogic DOORS
» DXL Exchange
»
Mkdir and several directories at once...
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.