Class: Factorix::Runtime::WSL::WSLPath
- Inherits:
-
Object
- Object
- Factorix::Runtime::WSL::WSLPath
- Defined in:
- lib/factorix/runtime/wsl.rb
Overview
WSL-specific path provider
This class fetches Windows environment variables via PowerShell in one batch operation and converts Windows paths to WSL paths.
Instance Method Summary collapse
-
#app_data ⇒ Pathname
Get the AppData directory path (WSL-converted).
-
#initialize ⇒ WSLPath
constructor
Initialize the path provider.
-
#local_app_data ⇒ Pathname
Get the Local AppData directory path (WSL-converted).
-
#program_files_x86 ⇒ Pathname
Get the Program Files (x86) directory path (WSL-converted).
Constructor Details
#initialize ⇒ WSLPath
Initialize the path provider
Sets up the mutex for thread-safe lazy initialization
46 47 48 |
# File 'lib/factorix/runtime/wsl.rb', line 46 def initialize @mutex = Mutex.new end |
Instance Method Details
#app_data ⇒ Pathname
Get the AppData directory path (WSL-converted)
58 |
# File 'lib/factorix/runtime/wsl.rb', line 58 def app_data = @app_data ||= Pathname(convert_windows_to_wsl(windows_paths["APPDATA"])) |
#local_app_data ⇒ Pathname
Get the Local AppData directory path (WSL-converted)
63 |
# File 'lib/factorix/runtime/wsl.rb', line 63 def local_app_data = @local_app_data ||= Pathname(convert_windows_to_wsl(windows_paths["LOCALAPPDATA"])) |
#program_files_x86 ⇒ Pathname
Get the Program Files (x86) directory path (WSL-converted)
53 |
# File 'lib/factorix/runtime/wsl.rb', line 53 def program_files_x86 = @program_files_x86 ||= Pathname(convert_windows_to_wsl(windows_paths["ProgramFiles(x86)"])) |