init_output_path Subroutine

public subroutine init_output_path(path_in)

If null or empty, use current directory (no prefix needed) Copy and process the path Handle path separators based on OS On Windows: convert forward slashes to backslashes Check if this looks like a Unix absolute path on Windows (starts with /) If so, prepend C: Remove trailing backslash(es) for consistent processing On Unix: convert backslashes to forward slashes Check if this looks like a Windows path on Unix Remove trailing slash(es) for consistent processing Store path for mkdir (without trailing separator) Add trailing separator for out_path (used when building file paths) Create the directory Windows: use cmd /c to run mkdir and suppress output Unix: use mkdir -p (creates parent directories, no error if exists) Verify directory exists using INQUIRE If inquire failed, try alternate method - check via directory listing Windows check Unix check Write confirmation

Arguments

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

Called by

proc~~init_output_path~~CalledByGraph proc~init_output_path init_output_path proc~readcio_read readcio_read proc~readcio_read->proc~init_output_path