[UP]


Manual Reference Pages  - system_rmdir (3)

NAME

system_rmdir(3f) - [M_system] call rmdir(3c) to remove empty directories (LICENSE:PD)

CONTENTS

Synopsis
Description
Example
Author
License

SYNOPSIS

function system_rmdir(dirname) result(err)

character(*),intent(in) :: dirname integer(c_int) :: err

DESCRIPTION

DIRECTORY
  The name of a directory to remove if it is empty
err zero (0) if no error occurred

EXAMPLE

Sample program:

   program demo_system_rmdir
   use M_system, only : system_perror
   use M_system, only : system_rmdir, system_mkdir
   use M_system, only : RWX_U
   implicit none
   integer :: ierr
   write(*,*)’BEFORE TRY TO CREATE _scratch/’
   call execute_command_line(’ls -ld _scratch’)

write(*,*)’TRY TO CREATE _scratch/’ ierr=system_mkdir(’_scratch’,RWX_U) write(*,*)’IERR=’,ierr call execute_command_line(’ls -ld _scratch’)

write(*,*)’TRY TO REMOVE _scratch/’ ierr=system_rmdir(’_scratch’) write(*,*)’IERR=’,ierr call execute_command_line(’ls -ld _scratch’)

write(*,*)’TRY TO REMOVE _scratch when it should be gone/’ ierr=system_rmdir(’_scratch’) call system_perror(’*test of system_rmdir*’) write(*,*)’IERR=’,ierr call execute_command_line(’ls -ld _scratch’)

end program demo_system_rmdir

Expected output:

AUTHOR

John S. Urban

LICENSE

Public Domain


system_rmdir (3) July 05, 2020
Generated by manServer 1.08 from a09de439-c5e4-49ec-b912-3bfe640c72ac using man macros.