Ghost1372

everything can be handy

PathHelper

GetFullPathToExe

1
2
var pathToExe = PathHelper.GetFullPathToExe();
//return: C:\\Users\\mahdi\\source\\repos\\App7\\App7\\bin\\x86\\Debug\\net6.0-windows10.0.19041.0\\win10-x86\\AppX"

GetFullPathToAsset

1
2
var pathToAsset = PathHelper.GetFullPathToAsset("logo.png");
//return: "C:\\Users\\mahdi\\source\\repos\\App7\\App7\\bin\\x86\\Debug\\net6.0-windows10.0.19041.0\\win10-x86\\AppX\\Assets\\logo.png"

GetFilePath

1
var path = await PathHelper.GetFilePath(filePath);

GetAppDataFolderPath

1
var appDataPath = await PathHelper.GetAppDataFolderPath();

GetExecutablePathNative

1
var exePath = await PathHelper.GetExecutablePathNative();

Demo

you can run demo and see this feature.

0%