Re: How to verify the path of an open file.
- From: David Tiktin <dtiktin@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jul 2007 12:08:33 -0500
On 26 Jul 2007, max.trinitron@xxxxxxx wrote:
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.
You're probably better off asking in an Microsoft specific newsgroup,
but you might want to look at the GetLongPathName() function. It
gives you the case-preserved full path name. But I'm not sure if
that qualifies as a simple way ;-)
Dave
--
D.a.v.i.d T.i.k.t.i.n
t.i.k.t.i.n [at] a.d.v.a.n.c.e.d.r.e.l.a.y [dot] c.o.m
.
- Follow-Ups:
- Re: How to verify the path of an open file.
- From: David Tiktin
- Re: How to verify the path of an open file.
- References:
- How to verify the path of an open file.
- From: max . trinitron
- How to verify the path of an open file.
- Prev by Date: Re: How important is software maintenance?
- Next by Date: Re: How to verify the path of an open file.
- Previous by thread: How to verify the path of an open file.
- Next by thread: Re: How to verify the path of an open file.
- Index(es):
Relevant Pages
|