fortplot_path_operations Module

Path manipulation and normalization utilities

This module handles cross-platform path operations including path mapping, separator normalization, and path parsing.



Functions

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

public function get_parent_directory(path) result(parent)

Extract parent directory from a path

Arguments

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

Return Value character(len=:), allocatable


Subroutines

public subroutine parse_path_segments(path, segments, n_segments)

Parse a path into directory segments

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
character(len=*), intent(out) :: segments(100)
integer, intent(out) :: n_segments