diff --git a/GlitchyEngine/src/Extension/System/IO/Path.bf b/GlitchyEngine/src/Extension/System/IO/Path.bf index cadb8f5..4fcf5a7 100644 --- a/GlitchyEngine/src/Extension/System/IO/Path.bf +++ b/GlitchyEngine/src/Extension/System/IO/Path.bf @@ -5,7 +5,7 @@ namespace System.IO; extension Path { - public static mixin GetScopedFullPath(String path) + public static mixin GetScopedFullPath(StringView path) { String fullPath = scope:: String(Path.MaxPath); Path.GetFullPath(path, fullPath); @@ -15,15 +15,15 @@ extension Path /// Opens the file browser and selects the specified file. /// @param path The path of the file to select. - public static extern Result OpenFolderAndSelectItem(String path); + public static extern Result OpenFolderAndSelectItem(StringView path); /// Opens the file browser in the given directory. /// @param directory The directory to show in the file browser. - public static extern Result OpenFolder(String directory); + public static extern Result OpenFolder(StringView directory); /// Shows a dialog in which the user can select which program to open the given file with. /// @param The Path of the file to open. - public static extern Result OpenWithDialog(String filePath); + public static extern Result OpenWithDialog(StringView filePath); public static void Fixup(String path) { diff --git a/GlitchyEngine/src/Platform/Windows/System/IO/Path.bf b/GlitchyEngine/src/Platform/Windows/System/IO/Path.bf index 22bbb98..25512be 100644 --- a/GlitchyEngine/src/Platform/Windows/System/IO/Path.bf +++ b/GlitchyEngine/src/Platform/Windows/System/IO/Path.bf @@ -47,7 +47,7 @@ extension Path { /// Opens the file browser and selects the specified file. /// @param path The path of the file to select. - public static override Result OpenFolderAndSelectItem(String path) + public static override Result OpenFolderAndSelectItem(StringView path) { String fullPath = GetScopedFullPath!(path); @@ -59,7 +59,7 @@ extension Path /// Opens the file browser in the given directory. /// @param directory The directory to show in the file browser. - public static override Result OpenFolder(String directory) + public static override Result OpenFolder(StringView directory) { String fullPath = GetScopedFullPath!(directory); @@ -69,7 +69,7 @@ extension Path return scope SpawnedProcess().Start(processInfo); } - public static override Result OpenWithDialog(String filePath) + public static override Result OpenWithDialog(StringView filePath) { String fullPath = GetScopedFullPath!(filePath);