Class: Factorix::Runtime::WSL::WSLPath

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeWSLPath

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_dataPathname

Get the AppData directory path (WSL-converted)

Returns:

  • (Pathname)

    the AppData directory



58
# File 'lib/factorix/runtime/wsl.rb', line 58

def app_data = @app_data ||= Pathname(convert_windows_to_wsl(windows_paths["APPDATA"]))

#local_app_dataPathname

Get the Local AppData directory path (WSL-converted)

Returns:

  • (Pathname)

    the Local AppData directory



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_x86Pathname

Get the Program Files (x86) directory path (WSL-converted)

Returns:

  • (Pathname)

    the Program Files (x86) directory



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)"]))