[Lazarus] Multi-platform console application, how to handle file paths?

Bart bartjunk64 at gmail.com
Wed Oct 30 13:06:42 CET 2019


On Wed, Oct 30, 2019 at 11:42 AM Bo Berglund via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

> >Windows knows specials paths starting with '\\'.
>
> But I don't! :(
> What is special with these?

\\?\C:\foo\bar\..\..
is not the same path as
C:\foo\bar\..\.. (which basically is C:\)

If a path starts with \\?\ like above, all characters in the path are
taken literally (so you cannot construct a relative path), or ot is
used to build a UNC path: \\?\UNC\
IIRC then also device names start with \\.\ or something the like.

See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Bart



-- 
Bart


More information about the lazarus mailing list