GetPath
Returns the path of a file.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE SUBROUTINE getPath(chars, path)
CHARACTER(*), INTENT(IN) :: chars
CHARACTER(*), INTENT(OUT) :: path
END SUBROUTINE getPath
END INTERFACE
program main
use easifemBase
implicit none
CHARACTER( LEN = * ), parameter :: afile = "./HelloWorld.txt"
CHARACTER( LEN = * ), parameter :: afile2 = "/dir1/dir2/HelloWorld.txt"
CHARACTER( LEN = 100 ) :: path, name, ext
CALL GetPath(afile, path)
CALL Display(path, "path = ")
results
path =./
CALL GetPath(afile2, path)
CALL Display(path, "path = ")
end program main
results
path =/dir1/dir2/