Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-10

filepaths on different systems

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Greetings,

Situation: I am writing some code which is compiled under various systems (linux, win, ...).

1.How can I find out if a filename is relative or absolute?

2.To concat a path and filename I must know the directory delimiter. How can I find out this character?

Thx in advance,
Mattias

Marco van de Voort
to Mattias Gaertner

[Charset iso-8859-1 unsupported, filtering to ASCII...]

Show quoted text 6 lines
Greetings, Situation: I am writing some code which is compiled under various systems (linux, win, ...). 1.How can I find out if a filename is relative or absolute?

Fexpand, but that doesn check for links on linux IIRC.

2.To concat a path and filename I must know the directory delimiter. How can I find out this character?

DirSep

But most standard procedures accept both / as \