Re: open() : Files that don't exist
- Posted by Brian Broker <brian_broker at yahoo.com> Jan 01, 2006
- 452 views
Vincent wrote: > > Alex Chamberlain wrote: > > > > Matt Lewis wrote: > > > > > > Alex Chamberlain wrote: > > > > > > > > Why does }}} <eucode>open("debug.txt", "w")</eucode> {{{ create a file called > > > > "DEBUG.TXT"? > > > > Is there a way to get around this? > > > > > > I hope not. What would you expect to happen when attempting to write a > > > file? Perhaps you want to open with "u"? Or maybe you should check to > > > see > > > if it's already in existence. But the behavior you quote is the proper > > > and > > > expected. > > > > > > Matt Lewis > > > > > > Basically, the file is not expected to exist - but I expect that call to > > create > > "debug.txt" not "DEBUG.TXT"! Minor - I no. > > > > Alex > > Thats interesting... it will have capital letters when created with a DOS > (EX), > but lowercase with Windows (EXW). > > > Regards, > Vincent how is that interesting? because it doesn't matter? curious, have you ever programmed before Windows existed? early OS's, including DOS, referenced all files with UPPER-CASE names in my brief experience with them. I suppose that's why. It's probably based on the fact that programming with case-sensitive punch-cards would kill too many trees (not to mention the issues with hanging chads). -- Brian