TruePath icon indicating copy to clipboard operation
TruePath copied to clipboard

Fast way to create a path from Environment.SpecialFolder

Open SKProCH opened this issue 3 months ago • 1 comments

Currently we need to do a new AbsolutePath(Environment.GetFolderPath(Environment.SpecialFolder.Programs)), but probably it worth to make this more short? Something like extension methods for enum Environment.SpecialFolder, which will be used like Environment.SpecialFolder.Programs.AsAbsolutePath().

SKProCH avatar Oct 12 '25 22:10 SKProCH

Yep, sure, this is a good idea. The only thing is that we'll need to figure out whether these paths are technically guaranteed to be absolute, or we'll need to resolve them somehow.

Either way, I approve API in the form of Environment.SpecialFolder.Programs.ToPath().

We can also go with TruePath.SpecialFolders.Programs, SpecialFolders.AppData etc.

ForNeVeR avatar Oct 13 '25 21:10 ForNeVeR