Linux-specific implementation of IShellHandler for shell interactions.
More...
|
| 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.
|
| ValueResult< string > | ExecuteShellCommand (string shellCommand, params string[] args) |
| | Executes a shell command in the command prompt.
|
Linux-specific implementation of IShellHandler for shell interactions.
Uses System.Runtime.InteropServices to interop with the Linux shell.
◆ CreateDirectoryLink()
| IResult FileSurfer.Linux.Services.Shell.LinuxShellHandler.CreateDirectoryLink |
( |
string | dirPath | ) |
|
|
inline |
Creates a symbolic link for the specified directory path.
- Parameters
-
| dirPath | The 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.Linux.Services.Shell.LinuxShellHandler.CreateFileLink |
( |
string | filePath | ) |
|
|
inline |
Creates a symbolic link for the specified file path.
- Parameters
-
| filePath | The 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.Linux.Services.Shell.LinuxShellHandler.ExecuteCommand |
( |
string | programName, |
|
|
params string[] | args ) |
|
inline |
Executes a command and returns stdout.
If stdout is empty, stderr is returned instead.
- Parameters
-
| programName | The executable or command name to run. |
| args | Arguments 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.Linux.Services.Shell.LinuxShellHandler.ExecuteCommandAsync |
( |
string | programName, |
|
|
params string[] | args ) |
|
inline |
Asynchronously executes a command and returns stdout.
If stdout is empty, stderr is returned instead.
- Parameters
-
| programName | The executable or command name to run. |
| args | Arguments 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.
◆ ExecuteShellCommand()
| ValueResult< string > FileSurfer.Linux.Services.Shell.LinuxShellHandler.ExecuteShellCommand |
( |
string | shellCommand, |
|
|
params string[] | args ) |
|
inline |
◆ OpenFile()
| IResult FileSurfer.Linux.Services.Shell.LinuxShellHandler.OpenFile |
( |
string | filePath | ) |
|
|
inline |
Opens the specified file using the operating system's default associated application.
- Parameters
-
| filePath | The full path to the file that should be opened. |
- Returns
- The operation result, including any launch error details.
Implements FileSurfer.Core.Services.Shell.ILocalShellHandler.
◆ OpenInNotepad()
| IResult FileSurfer.Linux.Services.Shell.LinuxShellHandler.OpenInNotepad |
( |
string | filePath | ) |
|
|
inline |
Opens the specified file in the configured text editor (referred to as Notepad in settings).
- Parameters
-
| filePath | The 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.
◆ OpenTerminalAt()
| IResult FileSurfer.Linux.Services.Shell.LinuxShellHandler.OpenTerminalAt |
( |
string | dirPath | ) |
|
|
inline |
Opens a terminal window rooted at the specified directory path.
- Parameters
-
| dirPath | The 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.
The documentation for this class was generated from the following file:
- /home/janecea/Documents/CODE/PROJECTS/FileSurfer/src/FileSurfer.Linux/Services/Shell/LinuxShellHandler.cs