FileSurfer 2.1.2
Cross-platform file manager with support for Git and SFTP
Loading...
Searching...
No Matches
FileSurfer.Windows.Services.Shell.WindowsShellHandler Class Reference

Windows-specific implementation of IShellHandler for shell interactions. More...

Inheritance diagram for FileSurfer.Windows.Services.Shell.WindowsShellHandler:
Collaboration diagram for FileSurfer.Windows.Services.Shell.WindowsShellHandler:

Public Member Functions

IResult CreateFileLink (string filePath)
 Creates a symbolic link for the specified file path.
IResult CreateDirectoryLink (string dirPath)
 Creates a symbolic link for the specified directory path.
IResult OpenFile (string filePath)
 Opens the specified file using the operating system's default associated application.
IResult OpenInNotepad (string filePath)
 Opens the specified file in the configured text editor (referred to as Notepad in settings).
IResult OpenTerminalAt (string dirPath)
 Opens a terminal window rooted at the specified directory path.
ValueResult< string > ExecuteCommand (string programName, params string[] args)
 Executes a command and returns stdout.
Task< ValueResult< string > > ExecuteCommandAsync (string programName, params string[] args)
 Asynchronously executes a command and returns stdout.

Detailed Description

Windows-specific implementation of IShellHandler for shell interactions.

Uses System.Runtime.InteropServices to interop with the Windows shell.

Member Function Documentation

◆ CreateDirectoryLink()

IResult FileSurfer.Windows.Services.Shell.WindowsShellHandler.CreateDirectoryLink ( string dirPath)
inline

Creates a symbolic link for the specified directory path.

Parameters
dirPathThe full path to the source directory that should be linked.
Returns
The operation result, including any error details if link creation fails.

Implements FileSurfer.Core.Services.Shell.IShellHandler.

◆ CreateFileLink()

IResult FileSurfer.Windows.Services.Shell.WindowsShellHandler.CreateFileLink ( string filePath)
inline

Creates a symbolic link for the specified file path.

Parameters
filePathThe full path to the source file that should be linked.
Returns
The operation result, including any error details if link creation fails.

Implements FileSurfer.Core.Services.Shell.IShellHandler.

◆ ExecuteCommand()

ValueResult< string > FileSurfer.Windows.Services.Shell.WindowsShellHandler.ExecuteCommand ( string programName,
params string[] args )
inline

Executes a command and returns stdout.


If stdout is empty, stderr is returned instead.

Parameters
programNameThe executable or command name to run.
argsArguments passed to the command in execution order.
Returns
A command result containing output text on success or error details on failure.

Implements FileSurfer.Core.Services.Shell.IShellHandler.

◆ ExecuteCommandAsync()

Task< ValueResult< string > > FileSurfer.Windows.Services.Shell.WindowsShellHandler.ExecuteCommandAsync ( string programName,
params string[] args )
inline

Asynchronously executes a command and returns stdout.


If stdout is empty, stderr is returned instead.

Parameters
programNameThe executable or command name to run.
argsArguments passed to the command in execution order.
Returns
A task that returns command output on success or error details on failure.

Implements FileSurfer.Core.Services.Shell.IShellHandler.

◆ OpenFile()

IResult FileSurfer.Windows.Services.Shell.WindowsShellHandler.OpenFile ( string filePath)
inline

Opens the specified file using the operating system's default associated application.

Parameters
filePathThe full path to the file that should be opened.
Returns
The operation result, including any launch error details.

Implements FileSurfer.Core.Services.Shell.ILocalShellHandler.

Here is the call graph for this function:

◆ OpenInNotepad()

IResult FileSurfer.Windows.Services.Shell.WindowsShellHandler.OpenInNotepad ( string filePath)
inline

Opens the specified file in the configured text editor (referred to as Notepad in settings).

Parameters
filePathThe full path to the file that should be opened in the configured editor.
Returns
The operation result, including any launch error details.

Implements FileSurfer.Core.Services.Shell.ILocalShellHandler.

Here is the call graph for this function:

◆ OpenTerminalAt()

IResult FileSurfer.Windows.Services.Shell.WindowsShellHandler.OpenTerminalAt ( string dirPath)
inline

Opens a terminal window rooted at the specified directory path.

Parameters
dirPathThe directory path that the opened terminal should use as its working directory.
Returns
The operation result, including any launch error details.

Implements FileSurfer.Core.Services.Shell.ILocalShellHandler.

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • /home/janecea/Documents/CODE/PROJECTS/FileSurfer/src/FileSurfer.Windows/Services/Shell/WindowsShellHandler.cs