![]() |
Bearsampp 2026.5.5
|
Static Public Member Functions | |
| static | clearPathFormatCache () |
| static | formatUnixPath ($path) |
| static | formatWindowsPath ($path) |
| static | getPathFormatCacheSize () |
| static | getPathFormatStats () |
Static Private Attributes | |
| static | $pathFormatCache = [] |
| static | $pathFormatCacheMaxSize = 500 |
| static | $pathFormatStats |
Path formatting utilities with a write-through cache.
Converts between Windows (backslash) and Unix (forward-slash) path styles and caches the results to avoid redundant string replacements for frequently used paths such as root, bin, and tool paths.
Usage:
Definition at line 24 of file class.util.path.php.
|
static |
Clears the path format cache. Useful when paths change or for testing purposes.
Definition at line 142 of file class.util.path.php.
|
static |
Converts a Windows-style path to a Unix-style path with caching. Unix-style paths use forward slashes (/) as separators.
Performance optimization: Caches results to avoid redundant string replacements for frequently used paths (e.g., root paths, bin paths).
| string | $path | The Windows-style path to convert. |
Definition at line 98 of file class.util.path.php.
References $result.
Referenced by Util\changePath(), ActionQuit\checkForOrphanedProcesses(), Root\errorHandler(), Win32Ps\findByPath(), Util\findFile(), Util\findFiles(), Util\findRepos(), BinApache\getAliasContent(), BinApache\getVhostContent(), Win32Ps\killBins(), ActionStartup\killOldInstances(), ActionGenSslCertificate\processWindow(), ActionStartup\processWindow(), and ToolGit\reload().
|
static |
Converts a Unix-style path to a Windows-style path with caching. This is a Windows application, so paths use backslashes () as separators.
Performance optimization: Caches results to avoid redundant string replacements for frequently used paths (e.g., root paths, bin paths).
| string | $path | The Unix-style path to convert. |
Definition at line 60 of file class.util.path.php.
References $result.
Referenced by ActionGenSslCertificate\__construct(), Util\changePath(), ActionStartup\checkPathRegKey(), ActionAddVhost\createFormFields(), ActionEditAlias\createFormFields(), ActionEditVhost\createFormFields(), Batch\createSymlink(), Module\createSymlink(), Util\getAppBinsRegKey(), TplAestan\getItemPowerShell(), Nssm\getNssmEnvPaths(), ToolPowerShell\getShell(), Batch\getTmpFile(), BinMariadb\initData(), Batch\installPostgresqlService(), Batch\refreshEnvVars(), BinMariadb\reload(), Batch\removeSymlink(), Nssm\setBinPath(), Win32Service\setBinPath(), Nssm\setEnvironmentExtra(), and Batch\uninstallPostgresqlService().
|
static |
Gets the current size of the path format cache.
Definition at line 158 of file class.util.path.php.
|
static |
Gets path format cache statistics. Useful for monitoring cache effectiveness and tuning cache size.
Definition at line 131 of file class.util.path.php.
|
staticprivate |
Definition at line 30 of file class.util.path.php.
|
staticprivate |
Definition at line 36 of file class.util.path.php.
|
staticprivate |
Definition at line 42 of file class.util.path.php.