1+ ! SPDX-Identifier: MIT
2+
3+ ! > Handling of zip files including creation and extraction.
14module stdlib_io_zip
25 use stdlib_filesystem, only: exists, run, temp_dir
36 use stdlib_string_type, only: string_type, char
@@ -12,11 +15,19 @@ module stdlib_io_zip
1215
1316contains
1417
18+ ! > Version: experimental
19+ ! >
20+ ! > Create a zip file from a list of files.
1521 subroutine zip (output_file , files , stat , msg , compressed )
22+ ! > Name of the zip file to create.
1623 character (* ), intent (in ) :: output_file
24+ ! > List of files to include in the zip file.
1725 type (string_type), intent (in ) :: files(:)
26+ ! > Optional error status of zipping, zero on success.
1827 integer , intent (out ), optional :: stat
28+ ! > Optional error message.
1929 character (len= :), allocatable , intent (out ), optional :: msg
30+ ! > If true, the file is saved in compressed format. The default is true.
2031 logical , intent (in ), optional :: compressed
2132
2233 integer :: run_stat, i
@@ -54,10 +65,17 @@ subroutine zip(output_file, files, stat, msg, compressed)
5465 end if
5566 end
5667
68+ ! > Version: experimental
69+ ! >
70+ ! > Extract a zip file to a directory.
5771 subroutine unzip (filename , outputdir , stat , msg )
72+ ! > Name of the zip file to extract.
5873 character (len=* ), intent (in ) :: filename
74+ ! > Directory to extract the zip file to.
5975 character (len=* ), intent (in ), optional :: outputdir
76+ ! > Optional error status of unzipping, zero on success.
6077 integer , intent (out ), optional :: stat
78+ ! > Optional error message.
6179 character (len= :), allocatable , intent (out ), optional :: msg
6280
6381 integer :: run_stat
0 commit comments