[fpc-pascal] Paths on different OS's
Michael Van Canneyt
michael at freepascal.org
Thu Jul 14 15:40:38 CEST 2005
On Thu, 14 Jul 2005, L505 wrote:
>
>
> | I always do something like this:
> |
> | {$ifdef UNIX}
> | const dirsep = '/';
> | {$else}
> | const dirsep = '\';
> | {$endif}
> |
> | path := ExtractFileDir(paramstr(0) + dirsep + 'somepath' + dirsep +
> | 'directory' + 'etc' + dirsep);
> |
> | Id imagine that one of fpc's units already has something very similar to
> | this.
>
> That's a good tip.. Yeah, so if anyone knows.. is there something like this
> already in a unit somewhere that should be used as a standard directory
> separator variable?
PathDelim (in sysutils, delphi compatible)
or
DirectorySeparator (FPC native, defined in system)
Michael.
>
>
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list