C Library Functions - system_isblk (3)
NAME
system_isblk(3f) - [M_system:QUERY_FILE] checks if argument is a block device
(LICENSE:PD)
CONTENTS
Synopsis
Description
Options
Return Value
Errors
See Also
Examples
SYNOPSIS
elemental impure logical function system_isblk(pathname)
character(len=*),intent(in) :: pathname
logical :: system_isblk
DESCRIPTION
The isblk(3f) function checks if path is a path to a block device.
OPTIONS
|
path |
a character string representing a block device pathname. Trailing
spaces are ignored.
|
|
RETURN VALUE
The system_isblk() function should always be successful and no
return value is reserved to indicate an error.
ERRORS
No errors are defined.
SEE ALSO
system_isreg(3f), system_stat(3f), system_isdir(3f), system_perm(3f)
EXAMPLES
check if filename is a block device
program demo_system_isblk
use M_system, only : system_isblk
implicit none
integer :: i
character(len=80),parameter :: names(*)=[ &
/tmp , &
/tmp/NOTTHERE , &
/usr/local , &
. , &
block_device.tst, &
PROBABLY_NOT ]
do i=1,size(names)
write(*,*) is ,trim(names(i)), a block device? , &
& system_isblk(names(i))
enddo
end program demo_system_isblk
Results:
| Nemo Release 3.1 | system_isblk (3) | June 29, 2025 |
Generated by manServer 1.08 from 4909d5da-a1a5-4310-86f7-f3efa46c9267 using man macros.