| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Creating a directory |
Hello Neil!
Replying to a message of Neil Heller to All:
NH> I wrote an application that I wish to modify in the following way:
NH> If a subdirectory of a certain name does not exist, create it.
NH> I thought: "this is a piece of cake". I'll use mkdir() and if the
NH> return value != 0, it already existed prior to the call.
NH> That's it. Quite easy, eh?
NH> Then I looked at the meager documentation I have and found that
NH> mkdir() is NON-standard (indeed, its provided as _mkdir()). Then I
True but false. mkdir() is indeed not part of the ANSI standard libraries.
However, it *is* part of the POSIX standard. If your compiler is
POSIX-standard, then it has mkdir().
NH> looked in Snippets and found that this venerable tool uses mkdir().
NH> I looked at the methods of the CFile class and found no help there.
NH> BTW, mkdir() is a standard part of Java, FWIW.
NH> Is there a "standard" way of dealing with directory creation?
Yes - in the POSIX standard :-)
NH> In thinking about this, it seems to me that directories are not
NH> standard so how can there be a standard way of dealing with them?
NH> However, since I realize this, you cannot use this excuse.
Darin
C_PLUSPLUS moderator
dmcbride{at}tower.to.org
---
* Origin: Tanktalus' Tower BBS (1:250/102)SEEN-BY: 633/267 270 @PATH: 250/102 99 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.