Checking path name

Joel joelcnz at gmail.com
Thu Dec 14 09:38:30 UTC 2023


On Thursday, 14 December 2023 at 08:47:49 UTC, Anonymouse wrote:
> On Thursday, 14 December 2023 at 03:58:37 UTC, Joel wrote:
>> If I get user input, for example, how do I check to see if 
>> it's a valid path, like, file name.
>>
>> ```d
>> // something like this:
>> if (getUserInput.isValidPath) {
>> ...
>> }
>> ```
>
> Is that not how it works?
>
> https://dlang.org/phobos/std_path.html#isValidPath
>
> https://dlang.org/phobos/std_path.html#.isValidFilename

Oh, forgot about std.path

But what's the difference between path and file name?



More information about the Digitalmars-d-learn mailing list