Win32:RequestFile and RequestDir

BlitzMax Forums/BlitzMax Programming/Win32:RequestFile and RequestDir

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.


What about a 'file comparison' function (getting two string as parameters, with a comparable filenames.
This function could process all the / and \ and even all the ..\ and .\ to get a simple path of each file, even convert the strings to lowercase or uppercase on win and mac, before comparing them, and return true or false if the given
strings are 'pointing' to the same file).


Well, there's already 'RealPath' in there which does most of this - eg: RealPath(x)=RealPath(y). This could easily be wrapped in a ComparePaths().

I think this RealPath/ComparePaths approach is probably the safest, instead of trying to coerce all file names at 'source' into a common format. This means it wont matter if the path is win32/unix/absolute/relative or whatever.

I will have a closer look at RealPath() and make sure it's up to the job!