C Library Functions - is_hidden_file (3)
NAME
is_hidden_file(3f) - [M_io:QUERY] determine if a pathname points to a
hidden file, which is defined as a file basename starting with a period.
(LICENSE:PD)
CONTENTS
Syntax
Description
Limitations
Options
Returns
Examples
See Also
Author
License
SYNTAX
impure elemental function is_hidden_file(PATH) result(YESNO)
character(len=*),intent(in) :: PATH
logical :: YESNO
DESCRIPTION
Given a pathname determine if it is a hidden file. This is simply
assumed to be a basename that does not begin with a period and is not
a single or double period, assumed to represent the current directory
and parent directory.
LIMITATIONS
Pathnames are not expanded to a canonical form, so if the basename is
value will still be .FALSE. . Filenames are assumed to not contain
leading or trailing spaces.
OPTIONS
|
PATH |
pathname to classify. It need not exist.
|
|
RETURNS
|
YESNO |
true if pathname points to a hidden file, otherwise it
is false.
|
|
EXAMPLES
Sample program:
program demo_is_hidden_file
use M_io, only : is_hidden_file, basename
call showit(.abc)
call showit(./.)
call showit(..)
call showit(...)
call showit(/abc/def/notes.txt)
call showit(/abc/def/.hide)
contains
subroutine showit(path)
character(len=*),intent(in) :: path
write(*,*)is_hidden_file(path), &
& ,path=,path
end subroutine showit
end program demo_is_hidden_file
Results:
> T ,path=.abc
> F ,path=./.
> F ,path=..
> T ,path=...
> F ,path=/abc/def/notes.txt
> T ,path=/abc/def/.hide
SEE ALSO
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | is_hidden_file (3) | June 29, 2025 |
Generated by manServer 1.08 from 2f94624f-ae85-421b-a06f-7d5327534811 using man macros.