GETCWD — Get current working directory¶
- GETCWD()¶
Get current working directory.
- Parameters
C – The type shall be
CHARACTER
and of default kind.STATUS – (Optional) status flag. Returns 0 on success, a system specific and nonzero error code otherwise.
Standard:
GNU extension
Class:
Subroutine, function
Syntax:
CALL GETCWD(C [, STATUS]) STATUS = GETCWD(C)
Example:
PROGRAM test_getcwd CHARACTER(len=255) :: cwd CALL getcwd(cwd) WRITE(*,*) TRIM(cwd) END PROGRAM
See also:
CHDIR