How to verify the path of an open file.



Under UNIX/Linux you open a file with

fopen("anyDirectory/MyFile" "r")

and when it succeeds you know that the filename (and path) of the file
opened is exactly what you requested (otherwise you get NULL).
Under Windows the search for a file is case insensitive. You may
just have opened the file "AnyDirectory/myFile".

In such a case I want to write an error message (This should lead to
better portability between UNIX/Linux and Windows).

Is there a simple way to verify that the right file (case sensitive
filename compare) has been opened.

May by I can tell windows that all my paths are case sensitive.

Max Trinitron

.



Relevant Pages

  • Re: How to verify the path of an open file.
    ... On 26 Jul 2007, David Tiktin ... and when it succeeds you know that the filename of the ... Under Windows the search for a file is case insensitive. ... sensitive filename compare) has been opened. ...
    (comp.programming)
  • Re: How to verify the path of an open file.
    ... and when it succeeds you know that the filename of the ... Under Windows the search for a file is case insensitive. ... sensitive filename compare) has been opened. ... You're probably better off asking in an Microsoft specific newsgroup, ...
    (comp.programming)
  • Re: Transferring directory structure to Windows
    ... Transferring directory structure to Windows ... Filename collisions are a real threat but it should be ... whether FTP, tar, or whatever, you will only wind up ...
    (AIX-L)
  • Re: Characters allowed in short filenames
    ... fatgen103.doc seems to have a slightly below average proportion of bugs, but Windows doesn't completely agree with it. ... > My partial understanding is that short filenames are stored using the> OEM ... > As far as I can tell, code page 437 doesn't contain a ß character. ... > page is 850 then we are halfway towards allowing a short filename to ...
    (microsoft.public.development.device.drivers)
  • gnu grep in windows
    ... windows, it should not be. ... while also fixing this filename case sensitivity ... Fix this first by giving grep a directory to recurse into. ...
    (comp.windows.x.i386unix)