Mail Archives: djgpp/1992/07/07/21:11:02
Eric writes:
>/ isn't a file, and it doesn't exist in another directory's file
>listing, but it IS a directory. I bet you're right about it not
>working with Turbo-C. But it certainly works on UNIX, and if anyone
>knows a good workaround for this on DOS, I'd like to see it.
>
>Seems like we could have the stat() function examine the first
>argument. If it's the root directory, fill in the stat buffer
>appropriately and then return it. If it's not the root directory,
>jump to "turbo_assist" and let Turbo-C handle it. Maybe I'll give
>this some work tonight.
Be aware that the same problem may exist for aliases for /, i.e. .. when the
working directory is /foo, etc.
This problem has been with MS-DOS since hierarchical file systems were
introduced; an ls that I & Chris Worrell wrote in assembler in 1984
suffered from it.
- Dan K.
- Raw text -