Close file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | self | File STL. |
subroutine close_file(self)
!< Close file.
class(file_stl_object), intent(inout) :: self !< File STL.
logical :: file_exist !< Sentinel to check if file exist.
if (self%is_open) then
close(unit=self%file_unit)
self%file_unit = 0
self%is_open = .false.
endif
endsubroutine close_file