FileSurfer 2.1.2
Cross-platform file manager with support for Git and SFTP
Loading...
Searching...
No Matches
FileSurfer.Core.FileSurferSettings Class Reference
Collaboration diagram for FileSurfer.Core.FileSurferSettings:

Static Public Member Functions

static void Initialize (IDefaultSettingsProvider settingsProvider)
static void ImportSettings (SettingsRecord settings)
 Loads and sanitizes settings from the SettingsRecord object and applies them to the current session.
static void SaveSettings ()
 Saves the current settings to the settings file if any changes have been made.

Static Public Attributes

static readonly string SettingsFilePath
 The full path to settings.json.
static readonly string SftpConnectionsFilePath
 The full path to sftp.json.
const int FileSizeUnitLimitLowerBound = 512
const int FileSizeUnitLimitUpperBound = 9999
const int AutomaticRefreshIntervalLowerBound = 100
const int AutomaticRefreshIntervalUpperBound = 60 * 1000
const int SynchronizerPollingIntervalLowerBound = 250
const int SynchronizerPollingIntervalUpperBound = 5 * 60 * 1000

Properties

static ? Action OnSettingsChange [set]
 Executes this function when settings are updated in ImportSettings.
static SettingsRecord DefaultSettings [get]
 Returns the default set of settings for the FileSurfer app.
static SettingsRecord CurrentSettings [get]
 Returns the current settings in the form of SettingsRecord.
static string NewImageName [get, set]
 Default name for the pasted image files.
static string NewTextFileName [get, set]
 Default name for the pasted text files.
static string NewFileName [get, set]
 Default name for newly created files.
static string NewDirectoryName [get, set]
 Default name for newly created directories.
static string NotepadApp [get, set]
 The application, the 'Open in Notepad' context menu option will open.
static string NotepadAppArgs [get, set]
 The args for NotepadApp.
static string Terminal [get, set]
 The preferred terminal app.
static string TerminalArgs [get, set]
 The args for Terminal.
static bool OpenInLastLocation [get, set]
 Specifies if the app should reopen files or folders in their last accessed location.
static string OpenIn [get, set]
 Specifies the default location where FileSurfer opens.
static bool UseDarkMode [get, set]
 Indicates whether the application uses a dark theme.
static DisplayMode DisplayMode [get, set]
 Defines the view mode for displaying files and folders.
static SortBy SortingMode [get, set]
 Specifies the default sorting method for files and folders.
static int FileSizeUnitLimit [get, set]
 Numerical limit before FileSurfer uses the next byte unit.
static bool SortReversed [get, set]
 Indicates whether file and folder sorting should be reversed.
static bool ShowSpecialFolders [get, set]
 Determines if special folders (like "Documents" or "Downloads") should be displayed in the sidebar.
static bool ShowProtectedFiles [get, set]
 Controls whether files with protection settings are shown in directory contents and searching.
static bool ShowHiddenFiles [get, set]
 Specifies if hidden files are shown in directory contents and searching.
static bool TreatDotFilesAsHidden [get, set]
 Decides if files starting with a dot '.
static bool GitIntegration [get, set]
 Enables or disables Git integration features within the application.
static bool ShowUndoRedoErrorDialogs [get, set]
 Determines if error dialogs should be shown for undo/redo operations.
static bool AutomaticRefresh [get, set]
 Indicates whether the file explorer should automatically refresh at intervals.
static int AutomaticRefreshInterval [get, set]
 Sets the interval (in milliseconds) for automatic refreshing of the file explorer.
static int SynchronizerPollingInterval [get, set]
 Defines the polling refresh rate for directory synchronization.
static List< string > QuickAccess [get, set]
 List of directories and files added by the user for quick access.
static bool SyncHiddenFiles [get, set]
 Specifies if hidden files should be synchronized in the process of directory synchronization.
static List< SftpConnection > SftpConnections [get, set]
 List of SFTP connections defined by the user.

Detailed Description

Provides application-wide settings management for the FileSurfer application.

Handles the loading, saving, and updating of user preferences and settings.

Member Function Documentation

◆ ImportSettings()

void FileSurfer.Core.FileSurferSettings.ImportSettings ( SettingsRecord settings)
inlinestatic

Loads and sanitizes settings from the SettingsRecord object and applies them to the current session.

Here is the caller graph for this function:

◆ Initialize()

void FileSurfer.Core.FileSurferSettings.Initialize ( IDefaultSettingsProvider settingsProvider)
inlinestatic

Loads settings from the settings file and applies them to the current session.

If the settings file does not exist or is invalid, default settings are used and settings.json is rewritten.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveSettings()

void FileSurfer.Core.FileSurferSettings.SaveSettings ( )
inlinestatic

Saves the current settings to the settings file if any changes have been made.

Member Data Documentation

◆ AutomaticRefreshIntervalLowerBound

const int FileSurfer.Core.FileSurferSettings.AutomaticRefreshIntervalLowerBound = 100
static

◆ AutomaticRefreshIntervalUpperBound

const int FileSurfer.Core.FileSurferSettings.AutomaticRefreshIntervalUpperBound = 60 * 1000
static

◆ FileSizeUnitLimitLowerBound

const int FileSurfer.Core.FileSurferSettings.FileSizeUnitLimitLowerBound = 512
static

◆ FileSizeUnitLimitUpperBound

const int FileSurfer.Core.FileSurferSettings.FileSizeUnitLimitUpperBound = 9999
static

◆ SettingsFilePath

readonly string FileSurfer.Core.FileSurferSettings.SettingsFilePath
static
Initial value:
= Path.Combine(
FileSurferDataDir,
"settings.json"
)

The full path to settings.json.

◆ SftpConnectionsFilePath

readonly string FileSurfer.Core.FileSurferSettings.SftpConnectionsFilePath
static
Initial value:
= Path.Combine(
FileSurferDataDir,
"sftp-connections.json"
)

The full path to sftp.json.

◆ SynchronizerPollingIntervalLowerBound

const int FileSurfer.Core.FileSurferSettings.SynchronizerPollingIntervalLowerBound = 250
static

◆ SynchronizerPollingIntervalUpperBound

const int FileSurfer.Core.FileSurferSettings.SynchronizerPollingIntervalUpperBound = 5 * 60 * 1000
static

Property Documentation

◆ AutomaticRefresh

bool FileSurfer.Core.FileSurferSettings.AutomaticRefresh
staticgetset

Indicates whether the file explorer should automatically refresh at intervals.

◆ AutomaticRefreshInterval

int FileSurfer.Core.FileSurferSettings.AutomaticRefreshInterval
staticgetset

Sets the interval (in milliseconds) for automatic refreshing of the file explorer.

◆ CurrentSettings

SettingsRecord FileSurfer.Core.FileSurferSettings.CurrentSettings
staticget

Returns the current settings in the form of SettingsRecord.

◆ DefaultSettings

SettingsRecord FileSurfer.Core.FileSurferSettings.DefaultSettings
staticget

Returns the default set of settings for the FileSurfer app.

◆ DisplayMode

DisplayMode FileSurfer.Core.FileSurferSettings.DisplayMode
staticgetset

Defines the view mode for displaying files and folders.

◆ FileSizeUnitLimit

int FileSurfer.Core.FileSurferSettings.FileSizeUnitLimit
staticgetset

Numerical limit before FileSurfer uses the next byte unit.

◆ GitIntegration

bool FileSurfer.Core.FileSurferSettings.GitIntegration
staticgetset

Enables or disables Git integration features within the application.

◆ NewDirectoryName

string FileSurfer.Core.FileSurferSettings.NewDirectoryName
staticgetset

Default name for newly created directories.

◆ NewFileName

string FileSurfer.Core.FileSurferSettings.NewFileName
staticgetset

Default name for newly created files.

◆ NewImageName

string FileSurfer.Core.FileSurferSettings.NewImageName
staticgetset

Default name for the pasted image files.

◆ NewTextFileName

string FileSurfer.Core.FileSurferSettings.NewTextFileName
staticgetset

Default name for the pasted text files.

◆ NotepadApp

string FileSurfer.Core.FileSurferSettings.NotepadApp
staticgetset

The application, the 'Open in Notepad' context menu option will open.

◆ NotepadAppArgs

string FileSurfer.Core.FileSurferSettings.NotepadAppArgs
staticgetset

The args for NotepadApp.

◆ OnSettingsChange

? Action FileSurfer.Core.FileSurferSettings.OnSettingsChange
staticset

Executes this function when settings are updated in ImportSettings.

◆ OpenIn

string FileSurfer.Core.FileSurferSettings.OpenIn
staticgetset

Specifies the default location where FileSurfer opens.

◆ OpenInLastLocation

bool FileSurfer.Core.FileSurferSettings.OpenInLastLocation
staticgetset

Specifies if the app should reopen files or folders in their last accessed location.

◆ QuickAccess

List<string> FileSurfer.Core.FileSurferSettings.QuickAccess
staticgetset

List of directories and files added by the user for quick access.

◆ SftpConnections

List<SftpConnection> FileSurfer.Core.FileSurferSettings.SftpConnections
staticgetset

List of SFTP connections defined by the user.

◆ ShowHiddenFiles

bool FileSurfer.Core.FileSurferSettings.ShowHiddenFiles
staticgetset

Specifies if hidden files are shown in directory contents and searching.

◆ ShowProtectedFiles

bool FileSurfer.Core.FileSurferSettings.ShowProtectedFiles
staticgetset

Controls whether files with protection settings are shown in directory contents and searching.

◆ ShowSpecialFolders

bool FileSurfer.Core.FileSurferSettings.ShowSpecialFolders
staticgetset

Determines if special folders (like "Documents" or "Downloads") should be displayed in the sidebar.

◆ ShowUndoRedoErrorDialogs

bool FileSurfer.Core.FileSurferSettings.ShowUndoRedoErrorDialogs
staticgetset

Determines if error dialogs should be shown for undo/redo operations.

◆ SortingMode

SortBy FileSurfer.Core.FileSurferSettings.SortingMode
staticgetset

Specifies the default sorting method for files and folders.

◆ SortReversed

bool FileSurfer.Core.FileSurferSettings.SortReversed
staticgetset

Indicates whether file and folder sorting should be reversed.

◆ SyncHiddenFiles

bool FileSurfer.Core.FileSurferSettings.SyncHiddenFiles
staticgetset

Specifies if hidden files should be synchronized in the process of directory synchronization.

◆ SynchronizerPollingInterval

int FileSurfer.Core.FileSurferSettings.SynchronizerPollingInterval
staticgetset

Defines the polling refresh rate for directory synchronization.

◆ Terminal

string FileSurfer.Core.FileSurferSettings.Terminal
staticgetset

The preferred terminal app.

◆ TerminalArgs

string FileSurfer.Core.FileSurferSettings.TerminalArgs
staticgetset

The args for Terminal.

◆ TreatDotFilesAsHidden

bool FileSurfer.Core.FileSurferSettings.TreatDotFilesAsHidden
staticgetset

Decides if files starting with a dot '.

' are considered hidden.

◆ UseDarkMode

bool FileSurfer.Core.FileSurferSettings.UseDarkMode
staticgetset

Indicates whether the application uses a dark theme.


The documentation for this class was generated from the following file: