File: example_is_file.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (14 lines) | stat: -rw-r--r-- 377 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! Demonstrate usage of `is_file`
program example_is_file
  use stdlib_system, only: is_file
  implicit none

  character(*), parameter :: path = "path/to/check"

  ! Test if path is a regular file
  if (is_file(path)) then
    print *, "The specified path is a regular file."
  else
    print *, "The specified path is not a regular file."
  end if
end program example_is_file