[Lazarus] Multi-platform console application, how to handle file paths?
Carlos E. R.
robin.listas at telefonica.net
Tue Oct 29 12:31:03 CET 2019
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 29/10/2019 12.25, Bo Berglund via lazarus wrote:
> I am writing a console application intended to be portable between
> Windows and Linux and it uses files on the file system for
> configuration and also for processing data.
>
> Since the path delimiter is different on Unix and Windows I believe
> I have to handle this in my code, but how?
Thinking...
Define a something case {what system} array of strings. Depending on
the system detected, you use one or the other array of (constant?)
strings, that contains the paths. Assuming they are fixed.
- --
Cheers / Saludos,
Carlos E. R.
(from 15.1 x86_64 at Telcontar)
-----BEGIN PGP SIGNATURE-----
iF0EARECAB0WIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXbgi9AAKCRC1MxgcbY1H
1dj2AJ9Qoqusdw0jaoFvLDSmiblv1bhjVQCfccLWxQ0mQO926h0mtAcS4tSADUk=
=/Ojl
-----END PGP SIGNATURE-----
More information about the lazarus
mailing list