private bool Open(string path)
{
//TODO: Find out if we can replace [result] with a returns
bool result = false;
if (File.Exists(path))
{
FileNameEntered?.Invoke(this, EventArgs.Empty);
result = true;
}
else if (Directory.Exists(path))
{
if (ShellView != null)
{
Text = string.Empty;
result = true;
}
}
else
{
Text = Path.GetFileName(path);
}
if (!Path.IsPathRooted(path) && ShellView.CurrentFolder.IsFileSystem) result = Open(Path.Combine(ShellView.CurrentFolder.FileSystemPath, path));
return result;
}
}