[UP]


Manual Reference Pages  - isdir (3)

NAME

isdir(3f) - [M_io] checks if argument is a directory path (LICENSE:MIT)

CONTENTS

Syntax
Description
Options
Returns
Examples
Author
License

SYNTAX

logical function isdir(path)

   character(len=*),intent(in) :: path
   logical                     :: isdir

DESCRIPTION

isdir(3f) checks if path is a path to a directory on Unix-compatible file systems

OPTIONS

path a character string representing a directory pathname. Trailing spaces are ignored.

RETURNS

isdir TRUE if the path is currently a directory

EXAMPLES

Sample program:

   program demo_isdir
   Use M_io, only : isdir
   implicit none
   integer                     :: i
   character(len=80),parameter :: names(*)=[ &
   ’/tmp            ’, &
   ’/tmp/NOTTHERE   ’, &
   ’/usr/local      ’, &
   ’.               ’, &
   ’PROBABLY_NOT    ’]
   do i=1,size(names)
      write(*,*)’ is ’,trim(names(i)),’ a directory? ’, isdir(names(i))
   enddo
   end program demo_isdir

Results:

   is /tmp a directory?  T
   is /tmp/NOTTHERE a directory?  F
   is /usr/local a directory?  T
   is . a directory?  T
   is PROBABLY_NOT a directory?  F

AUTHOR

John S. Urban

LICENSE

MIT License


isdir (3) November 10, 2019
Generated by manServer 1.08 from 059822c7-4bc5-4994-a56b-68e39ad9b32e using man macros.