fortplot_system_runtime Module

Runtime OS detection and cross-platform system operations This module avoids preprocessor issues by detecting OS at runtime



Functions

public function is_windows() result(windows)

Detect if running on Windows at runtime

Arguments

None

Return Value logical

public function map_unix_to_windows_path(path) result(mapped_path)

Map Unix-style /tmp paths to Windows-compatible paths

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

Return Value character(len=:), allocatable

public function normalize_path_separators(path, to_windows) result(normalized)

Normalize path separators for the target platform

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
logical, intent(in) :: to_windows

Return Value character(len=:), allocatable


Subroutines

public subroutine create_directory_runtime(path, success)

Create directory with security restrictions SECURITY: Only allows creation of test output directories

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
logical, intent(out) :: success

public subroutine delete_file_runtime(filename, success)

SECURITY: File deletion disabled for security compliance

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
logical, intent(out) :: success

public subroutine open_with_default_app_runtime(filename, success)

Open file with default application - SECURITY: Disabled for compliance

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
logical, intent(out) :: success

public subroutine check_command_available_runtime(command_name, available)

Check if a command is available - with security restrictions

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: command_name
logical, intent(out) :: available