fdoc

modulefdoc_shell

What standard Fortran cannot do with the file system, through the shell of the platform: cmd.exe on Windows, and sh elsewhere. All commands that differ between them are here. The tests call these from several threads, so they do not return deferred-length strings (see example/slen_race.f90).

Uses

  • ffmt_fs

Graphs

Used by

Functions

is_windowsprivate

logical function is_windows()

True on Windows, which sets the variable OS to this value.

quoted

character(len=len(text)+2) function quoted(text) result(out)

text in quotes, as one argument of a command.

quoted_path

character(len=len(path)+2) function quoted_path(path) result(out)

path in quotes, with the separator of the platform, as one argument of a command.

Subroutines

copy_file

subroutine copy_file(from, to, stat)

Copy file from to to.

copy_path

subroutine copy_path(from, to, stat)

Copy file or directory from to to, with what a directory holds.

make_directory

subroutine make_directory(path, stat)

Create directory path with those above it, if it does not exist. It is not a failure if something else creates it first.

remove_directory

subroutine remove_directory(path)

Delete directory path with what it holds, if it exists.

run_command

subroutine run_command(command, stat)

Run command and wait for it. Without cmdstat, a program can stop with an error if the command is not found, which some shells report with status 127.

temporary_directory

subroutine temporary_directory(path)

The directory for temporary files.