C Library Functions - system_getcwd (3)
NAME
system_getcwd(3f) - [M_system:QUERY_FILE] call getcwd(3c) to get
the pathname of the current working directory
(LICENSE:PD)
CONTENTS
Synopsis
Description
Return Value
Examples
Author
License
SYNOPSIS
subroutine system_getcwd(output,ierr)
character(len=:),allocatable,intent(out) :: output
integer,intent(out) :: ierr
DESCRIPTION
system_getcwd(3f) calls the C routine getcwd(3c) to obtain the
absolute pathname of the current working directory.
RETURN VALUE
|
OUTPUT |
The absolute pathname of the current working directory
The pathname shall contain no components that are dot
or dot-dot, or are symbolic links.
|
|
IERR |
is not zero if an error occurs.
|
|
EXAMPLES
Sample program:
program demo_system_getcwd
use M_system, only : system_getcwd
implicit none
character(len=:),allocatable :: dirname
integer :: ierr
call system_getcwd(dirname,ierr)
if(ierr.eq.0)then
write(*,*)CURRENT DIRECTORY ,trim(dirname)
else
write(*,*)ERROR OBTAINING CURRENT DIRECTORY NAME
endif
end program demo_system_getcwd
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | system_getcwd (3) | June 29, 2025 |
Generated by manServer 1.08 from 3c9e8009-5d5a-437c-8506-6b867778b78d using man macros.