This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #158 - Open directory in file explorer
- Loading branch information
1 parent
2a34f93
commit 42771d7
Showing
5 changed files
with
47 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/Infrastructure/Probel.Lanceur.Infrastructure/Utils/ExplorerProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Probel.Lanceur.Core.Entities; | ||
using Probel.Lanceur.Core.Services; | ||
using System.IO; | ||
|
||
namespace Probel.Lanceur.Infrastructure.Utils | ||
{ | ||
public class ExplorerProxy | ||
{ | ||
#region Fields | ||
|
||
private readonly ICommandRunner _cmdRunner; | ||
|
||
private readonly string _path; | ||
|
||
#endregion Fields | ||
|
||
#region Constructors | ||
|
||
public ExplorerProxy(string path, ICommandRunner cmdRunner) | ||
{ | ||
_cmdRunner = cmdRunner; | ||
_path = path.Trim('"'); | ||
} | ||
|
||
#endregion Constructors | ||
|
||
#region Methods | ||
|
||
public bool CanOpenInExplorer() => IsDirectory() || IsFile(); | ||
|
||
public bool IsDirectory() => Directory.Exists(_path); | ||
|
||
public bool IsFile() => File.Exists(_path); | ||
|
||
public ExecutionResult OpenInExplorer() => _cmdRunner.Execute(Alias.FromPath(_path)); | ||
|
||
#endregion Methods | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
using System.Reflection; | ||
|
||
[assembly: AssemblyVersion("0.8.1.8")] | ||
[assembly: AssemblyVersion("0.8.1.11")] | ||
[assembly: AssemblyFileVersion("0.8.1.0")] | ||
[assembly: AssemblyInformationalVersion("0.8.1-beta.8+Branch.develop.Sha.a97991f6042fca627e488aaf26e627e8a343c67c")] | ||
[assembly: AssemblyInformationalVersion("0.8.1-beta.11+Branch.develop.Sha.2a34f934bfd41dc676e032e2c83829de88a79a58")] | ||
|