[fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?
Michael Van Canneyt
michael at freepascal.org
Sun Nov 19 13:04:50 CET 2023
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote:
> On Sun, Nov 19, 2023 at 11:04 AM Sven Barth via fpc-pascal
> <fpc-pascal at lists.freepascal.org> wrote:
>
>
>> Also: does this depend on the operating system and/or file system? Cause Linux file systems have different invalid characters (usually only slash and NUL) than NTFS or FAT.
>
> Determining FileSystem at runtime, is that even possible?
> Adjusting the TPath.HasValidPathChars and TPath.GetInvalidPathChars
> functions for *nix maye be rather easy (there laready is non-windows
> code in that unit)
>
> ValidateParams may even mean (ATM nobody seems to know) that the
> params must represent a valid path (either on it's own or after
> concatenation).
You cannot test that as the path does not need to exist or does not even
need to be complete. Consequently it's also not possible to determine the
filesystem and hence not possible to test on that.
Note that there is also a 4 path elements version of the call.
Seems to me you can simply repeatedly call the 2 path version from back to
front.
If I need to do more tests, let me know.
Michael.
More information about the fpc-pascal
mailing list