Index

Package: UnZip

Description

package UnZip is
NB: this is the MIT License, as found 12-Sep-2007 on the site http://www.opensource.org/licenses/mit-license.php

Types

option

type option is (
    test_only,            -- test .zip file integrity, no write
    junk_directories,     -- ignore directory info -> extract to current one
    case_sensitive_match, -- case sensitive name matching
    extract_as_text       -- files will be written with native line endings
  );

References:

unzip.ads:55:8 (declaration)
unzip.ads:62:29 (reference)

Option_set

type Option_set is array( option ) of Boolean;

References:

unzip.ads:62:8 (declaration)
unzip.adb:25:32 (reference)
unzip.adb:357:45 (reference)
unzip.adb:368:45 (reference)
unzip.adb:380:45 (reference)
unzip.adb:390:45 (reference)
unzip.adb:401:45 (reference)
unzip.adb:413:45 (reference)
unzip.adb:438:45 (reference)
unzip.adb:486:45 (reference)
unzip.adb:532:45 (reference)
unzip.adb:582:45 (reference)
unzip.adb:616:45 (reference)
unzip.adb:671:45 (reference)
unzip.ads:64:23 (reference)
unzip.ads:105:45 (reference)
unzip.ads:114:45 (reference)
unzip.ads:125:45 (reference)
unzip.ads:138:45 (reference)
unzip.ads:148:45 (reference)
unzip.ads:160:45 (reference)
unzip.ads:210:45 (reference)
unzip.ads:223:45 (reference)
unzip.ads:237:36 (reference)
unzip.ads:252:45 (reference)
unzip.ads:266:45 (reference)
unzip.ads:281:45 (reference)

Create_Path_proc

type Create_Path_proc is access
    procedure (New_Directory : in String;
               Form          : in String := "");

References:

unzip.ads:68:8 (declaration)
unzip.ads:88:30 (reference)
Ada 2005's Ada.Directories.Create_Path. For Ada 95 compatibility we pass it as an optional procedure access.

Set_Time_Stamp_proc

type Set_Time_Stamp_proc is access
    procedure (file_name: String; stamp: Ada.Calendar.Time);

References:

unzip.ads:73:8 (declaration)
unzip.ads:89:30 (reference)
This is system-dependent (or in a future Ada)

Set_ZTime_Stamp_proc

type Set_ZTime_Stamp_proc is access
    procedure (file_name: String; stamp: Zip.Time);

References:

unzip.ads:77:8 (declaration)
unzip.ads:92:30 (reference)
Alternatively, you can use Zip.Time to set file time stamps

Compose_func

type Compose_func is access function (File_Name : String) return String;

References:

unzip.ads:84:8 (declaration)
unzip.ads:91:30 (reference)
This is for modifying output file names (e.g. adding a work directory, modifying the archived path, etc.)

FS_routines_type

type FS_routines_type is record
    Create_Path            : Create_Path_proc;
    Set_Time_Stamp         : Set_Time_Stamp_proc;
    Directory_Separator    : Character;
    Compose_File_Name      : Compose_func;
    Set_ZTime_Stamp        : Set_ZTime_Stamp_proc; -- alt. to Set_Time_Stamp
  end record;

References:

unzip.ads:87:8 (declaration)
unzip.adb:27:32 (reference)
unzip.adb:359:45 (reference)
unzip.adb:370:45 (reference)
unzip.adb:382:45 (reference)
unzip.adb:392:45 (reference)
unzip.adb:403:45 (reference)
unzip.adb:415:45 (reference)
unzip.adb:440:45 (reference)
unzip.adb:488:45 (reference)
unzip.adb:534:45 (reference)
unzip.adb:584:45 (reference)
unzip.adb:618:45 (reference)
unzip.adb:673:45 (reference)
unzip.ads:95:27 (reference)
unzip.ads:107:45 (reference)
unzip.ads:116:45 (reference)
unzip.ads:127:45 (reference)
unzip.ads:140:45 (reference)
unzip.ads:150:45 (reference)
unzip.ads:162:45 (reference)
unzip.ads:212:45 (reference)
unzip.ads:225:45 (reference)
unzip.ads:239:45 (reference)
unzip.ads:254:45 (reference)
unzip.ads:268:45 (reference)
unzip.ads:283:45 (reference)
File System dependent settings

PKZip_method

subtype PKZip_method is Zip.PKZip_method;

References:

unzip.ads:165:11 (declaration)
unzip-decompress.adb:9:27 (reference)
unzip-decompress.ads:24:27 (reference)
unzip-streams.adb:38:13 (reference)
unzip.adb:33:13 (reference)
unzip.ads:201:38 (reference)

Name_conflict_intervention

type Name_conflict_intervention is
    ( yes, no, yes_to_all, none, rename_it, abort_now );

References:

unzip.ads:176:8 (declaration)
unzip.ads:179:27 (reference)
unzip.ads:184:39 (reference)

Resolve_conflict_proc

type Resolve_conflict_proc is access
    procedure ( name            :  in String;
                action          : out Name_conflict_intervention;
                new_name        : out String;
                new_name_length : out Natural );

References:

unzip.ads:182:8 (declaration)
unzip.adb:22:32 (reference)
unzip.adb:435:45 (reference)
unzip.adb:529:45 (reference)
unzip.adb:579:45 (reference)
unzip.adb:613:45 (reference)
unzip.ads:207:45 (reference)
unzip.ads:220:45 (reference)
unzip.ads:249:45 (reference)
unzip.ads:263:45 (reference)

Get_password_proc

type Get_password_proc is access
    procedure(password: out Ada.Strings.Unbounded.Unbounded_String);

References:

unzip.ads:189:8 (declaration)
unzip-decompress.adb:19:27 (reference)
unzip-decompress.ads:34:27 (reference)
unzip.adb:24:32 (reference)
unzip.adb:437:45 (reference)
unzip.adb:485:45 (reference)
unzip.adb:531:45 (reference)
unzip.adb:581:45 (reference)
unzip.adb:615:45 (reference)
unzip.adb:670:45 (reference)
unzip.ads:209:45 (reference)
unzip.ads:222:45 (reference)
unzip.ads:236:36 (reference)
unzip.ads:251:45 (reference)
unzip.ads:265:45 (reference)
unzip.ads:280:45 (reference)

File_size_type

subtype File_size_type is Zip.File_size_type;

References:

unzip.ads:193:11 (declaration)
unzip-decompress.adb:50:15 (reference)
unzip-decompress.adb:177:42 (reference)
unzip-decompress.adb:381:41 (reference)
unzip-decompress.adb:598:41 (reference)
unzip-decompress.adb:674:18 (reference)
unzip-decompress.adb:763:29 (reference)
unzip-decompress.adb:840:18 (reference)
unzip-decompress.adb:910:29 (reference)
unzip-decompress.adb:1389:30 (reference)
unzip-decompress.adb:1390:35 (reference)
unzip-decompress.adb:1879:28 (reference)
unzip-decompress.adb:1880:27 (reference)
unzip-streams.adb:30:30 (reference)
unzip-streams.adb:31:30 (reference)
unzip-streams.adb:111:9 (reference)
unzip-streams.adb:136:20 (reference)
unzip-streams.adb:137:20 (reference)
unzip.adb:20:32 (reference)
unzip.adb:42:23 (reference)
unzip.adb:169:21 (reference)
unzip.adb:223:44 (reference)
unzip.adb:233:24 (reference)
unzip.adb:245:11 (reference)
unzip.adb:261:11 (reference)
unzip.adb:334:9 (reference)
unzip.adb:448:20 (reference)
unzip.adb:449:20 (reference)
unzip.adb:496:20 (reference)
unzip.adb:497:20 (reference)
unzip.adb:556:9 (reference)
unzip.adb:622:20 (reference)
unzip.adb:623:20 (reference)
unzip.adb:677:20 (reference)
unzip.adb:678:20 (reference)
unzip.ads:199:38 (reference)
unzip.ads:200:38 (reference)
Data sizes in archive

Tell_data_proc

type Tell_data_proc is access
    procedure ( name               : String;
                compressed_bytes   : File_size_type;
                uncompressed_bytes : File_size_type;
                method             : PKZip_method );

References:

unzip.ads:197:8 (declaration)
unzip.adb:23:32 (reference)
unzip.adb:436:45 (reference)
unzip.adb:484:45 (reference)
unzip.adb:530:45 (reference)
unzip.adb:580:45 (reference)
unzip.adb:614:45 (reference)
unzip.adb:669:45 (reference)
unzip.ads:208:45 (reference)
unzip.ads:221:45 (reference)
unzip.ads:235:36 (reference)
unzip.ads:250:45 (reference)
unzip.ads:264:45 (reference)
unzip.ads:279:45 (reference)

Constants & Global variables

no_option (Option_set)

no_option: constant Option_set:= ( others=> False );

References:

unzip.ads:64:3 (declaration)
unzip.adb:357:58 (reference)
unzip.adb:368:58 (reference)
unzip.adb:380:58 (reference)
unzip.adb:390:58 (reference)
unzip.adb:401:58 (reference)
unzip.adb:413:58 (reference)
unzip.adb:438:58 (reference)
unzip.adb:486:58 (reference)
unzip.adb:532:58 (reference)
unzip.adb:582:58 (reference)
unzip.adb:616:58 (reference)
unzip.adb:671:58 (reference)
unzip.ads:105:58 (reference)
unzip.ads:114:58 (reference)
unzip.ads:125:58 (reference)
unzip.ads:138:58 (reference)
unzip.ads:148:58 (reference)
unzip.ads:160:58 (reference)
unzip.ads:210:58 (reference)
unzip.ads:223:58 (reference)
unzip.ads:237:49 (reference)
unzip.ads:252:58 (reference)
unzip.ads:266:58 (reference)
unzip.ads:281:58 (reference)

null_routines (FS_routines_type)

null_routines: constant FS_routines_type:= (null,null,'\',null,null);

References:

unzip.ads:95:3 (declaration)
unzip.adb:359:64 (reference)
unzip.adb:370:64 (reference)
unzip.adb:382:64 (reference)
unzip.adb:392:64 (reference)
unzip.adb:403:64 (reference)
unzip.adb:415:64 (reference)
unzip.adb:440:64 (reference)
unzip.adb:488:64 (reference)
unzip.adb:534:64 (reference)
unzip.adb:584:64 (reference)
unzip.adb:618:64 (reference)
unzip.adb:673:64 (reference)
unzip.ads:107:64 (reference)
unzip.ads:116:64 (reference)
unzip.ads:127:64 (reference)
unzip.ads:140:64 (reference)
unzip.ads:150:64 (reference)
unzip.ads:162:64 (reference)
unzip.ads:212:64 (reference)
unzip.ads:225:64 (reference)
unzip.ads:239:64 (reference)
unzip.ads:254:64 (reference)
unzip.ads:268:64 (reference)
unzip.ads:283:64 (reference)

current_user_attitude (Name_conflict_intervention)

current_user_attitude : Name_conflict_intervention:= yes;

References:

unzip.ads:179:3 (declaration)
unzip.adb:130:16 (reference)
unzip.adb:134:17 (write reference)
unzip.adb:141:13 (reference)
unzip.adb:147:14 (reference)
unzip.adb:453:7 (write reference)
unzip.adb:501:7 (write reference)
unzip.adb:545:7 (write reference)
unzip.adb:638:7 (write reference)
unzip.adb:693:7 (write reference)
reset to "yes" for a new session (in case of yes_to_all / none state!)

CRC_Error

CRC_Error,
  Uncompressed_size_Error,
  Write_Error,
  Read_Error,
  Wrong_password,
  User_abort,
  Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:288:3 (declaration)
unzip-decompress.adb:1954:13 (reference)

Uncompressed_size_Error

Uncompressed_size_Error,
  Write_Error,
  Read_Error,
  Wrong_password,
  User_abort,
  Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:289:3 (declaration)
unzip-decompress.adb:1947:17 (reference)
unzip-streams.adb:79:15 (reference)

Write_Error

Write_Error,
  Read_Error,
  Wrong_password,
  User_abort,
  Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:290:3 (declaration)
unzip-decompress.adb:376:25 (reference)
unzip-decompress.adb:593:25 (reference)
unzip-decompress.adb:1413:27 (reference)

Read_Error

Read_Error,
  Wrong_password,
  User_abort,
  Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:291:3 (declaration)
unzip-decompress.adb:1086:23 (reference)
unzip-decompress.adb:1180:23 (reference)
unzip-decompress.adb:1407:27 (reference)
unzip-decompress.adb:1905:19 (reference)
unzip-streams.adb:52:15 (reference)
unzip-streams.adb:88:28 (reference)
unzip.adb:199:15 (reference)
unzip.adb:288:30 (reference)

Wrong_password

Wrong_password,
  User_abort,
  Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:292:3 (declaration)
unzip-decompress.adb:262:25 (reference)
unzip-decompress.adb:1892:16 (reference)

User_abort

User_abort,
  Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:293:3 (declaration)
unzip-decompress.adb:390:21 (reference)
unzip-decompress.adb:607:19 (reference)
unzip.adb:157:19 (reference)

Not_supported

Not_supported,
  Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:294:3 (declaration)
unzip-decompress.adb:691:23 (reference)

Unsupported_method

Unsupported_method,
  Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:295:3 (declaration)
unzip-decompress.adb:1927:17 (reference)
unzip-streams.adb:57:13 (reference)
unzip.adb:204:13 (reference)

Wrong_or_no_password

Wrong_or_no_password,
  Internal_Error : exception;

References:

unzip.ads:296:3 (declaration)

Internal_Error

Internal_Error : exception;

References:

unzip.ads:297:3 (declaration)

Subprograms & Entries

Extract

procedure Extract
( from: String;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:104:13 (declaration)
unzip.adb:356:13 (body)
unzip.adb:364:7 (label)

Calls:

Extract defined at unzip.ads:205:13
Extract one precise file (what) from an archive (from)

Extract

procedure Extract
( from: String;
what: String;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:112:13 (declaration)
unzip.adb:366:13 (body)
unzip.adb:375:7 (label)

Calls:

Extract defined at unzip.ads:217:13
Extract one precise file (what) from an archive (from), but save under a new name (rename)

Extract

procedure Extract
( from: String;
what: String;
rename: String;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:122:13 (declaration)
unzip.adb:377:13 (body)
unzip.adb:387:7 (label)

Calls:

Extract defined at unzip.ads:231:13
----------------------------------------------------------------------- Simple extraction procedures without re-searching central directory -- -----------------------------------------------------------------------

Extract

procedure Extract
( from: Zip.Zip_info;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:137:13 (declaration)
unzip.adb:389:13 (body)
unzip.adb:397:7 (label)

Calls:

Extract defined at unzip.ads:247:13
Extract one precise file (what) from an archive (from) Needs Zip.Load(from, ...) prior to the extraction

Extract

procedure Extract
( from: Zip.Zip_info;
what: String;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:146:13 (declaration)
unzip.adb:399:13 (body)
unzip.adb:408:7 (label)

Calls:

Extract defined at unzip.ads:260:13
Extract one precise file (what) from an archive (from), but save under a new name (rename) Needs Zip.Load(from, ...) prior to the extraction

Extract

procedure Extract
( from: Zip.Zip_info;
what: String;
rename: String;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:157:13 (declaration)
unzip.adb:410:13 (body)
unzip.adb:420:7 (label)

Calls:

Extract defined at unzip.ads:275:13

Extract

procedure Extract
( from: String;
feedback: Zip.Feedback_proc;
help_the_file_exists: Resolve_conflict_proc;
tell_data: Tell_data_proc;
get_pwd: Get_password_proc;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:205:13 (declaration)
unzip.adb:362:5 (reference)
unzip.adb:527:13 (body)
unzip.adb:572:7 (label)

Called by:

Extract defined at unzip.ads:104:13

Calls:

To_Unbounded_String defined at a-strunb.ads:59:13
UnZip.UnZipFile defined at unzip.adb:15:13
Zip.Find_first_offset defined at zip.ads:173:13
Zip_Streams.Close defined at zip_streams.ads:101:14
Zip_Streams.Open defined at zip_streams.ads:94:14
Zip_Streams.SetName defined at zip_streams.ads:50:14
Extract one precise file (what) from an archive (from)

Extract

procedure Extract
( from: String;
what: String;
feedback: Zip.Feedback_proc;
help_the_file_exists: Resolve_conflict_proc;
tell_data: Tell_data_proc;
get_pwd: Get_password_proc;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:217:13 (declaration)
unzip.adb:373:5 (reference)
unzip.adb:432:13 (body)
unzip.adb:475:7 (label)

Called by:

Extract defined at unzip.ads:112:13

Calls:

To_Unbounded_String defined at a-strunb.ads:59:13
UnZip.UnZipFile defined at unzip.adb:15:13
Zip.Find_offset defined at zip.ads:180:13
Zip_Streams.Close defined at zip_streams.ads:101:14
Zip_Streams.Open defined at zip_streams.ads:94:14
Zip_Streams.SetName defined at zip_streams.ads:50:14
Extract one precise file (what) from an archive (from), but save under a new name (rename)

Extract

procedure Extract
( from: String;
what: String;
rename: String;
feedback: Zip.Feedback_proc;
tell_data: Tell_data_proc;
get_pwd: Get_password_proc;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:231:13 (declaration)
unzip.adb:385:5 (reference)
unzip.adb:480:13 (body)
unzip.adb:523:7 (label)

Called by:

Extract defined at unzip.ads:122:13

Calls:

To_Unbounded_String defined at a-strunb.ads:59:13
UnZip.UnZipFile defined at unzip.adb:15:13
Zip.Find_offset defined at zip.ads:180:13
Zip_Streams.Close defined at zip_streams.ads:101:14
Zip_Streams.Open defined at zip_streams.ads:94:14
Zip_Streams.SetName defined at zip_streams.ads:50:14
Using Zip_info structure:

Extract

procedure Extract
( from: Zip.Zip_info;
feedback: Zip.Feedback_proc;
help_the_file_exists: Resolve_conflict_proc;
tell_data: Tell_data_proc;
get_pwd: Get_password_proc;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:247:13 (declaration)
unzip.adb:395:5 (reference)
unzip.adb:577:13 (body)
unzip.adb:605:7 (label)

Called by:

Extract defined at unzip.ads:137:13

Calls:

UnZip.Extract.Extract_1_file defined at unzip.adb:587:15
UnZip.Extract.Extract_all_files defined at unzip.adb:601:15
Zip.Traverse defined at zip.ads:143:13
Extract one precise file (what) from an archive (from) Needs Zip.Load(from, ...) prior to the extraction

Extract

procedure Extract
( from: Zip.Zip_info;
what: String;
feedback: Zip.Feedback_proc;
help_the_file_exists: Resolve_conflict_proc;
tell_data: Tell_data_proc;
get_pwd: Get_password_proc;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:260:13 (declaration)
unzip.adb:406:5 (reference)
unzip.adb:589:7 (reference)
unzip.adb:610:13 (body)
unzip.adb:659:7 (label)

Called by:

Extract defined at unzip.ads:146:13
UnZip.Extract.Extract_1_file defined at unzip.adb:587:15

Calls:

To_Unbounded_String defined at a-strunb.ads:59:13
UnZip.UnZipFile defined at unzip.adb:15:13
Zip.Find_offset defined at zip.ads:191:13
Zip.Zip_name defined at zip.ads:86:12
Zip.Zip_stream defined at zip.ads:90:12
Zip_Streams.Close defined at zip_streams.ads:101:14
Zip_Streams.Open defined at zip_streams.ads:94:14
Zip_Streams.SetName defined at zip_streams.ads:50:14
Extract one precise file (what) from an archive (from), but save under a new name (rename) Needs Zip.Load(from, ...) prior to the extraction

Extract

procedure Extract
( from: Zip.Zip_info;
what: String;
rename: String;
feedback: Zip.Feedback_proc;
tell_data: Tell_data_proc;
get_pwd: Get_password_proc;
options: Option_set:= no_option;
password: String:= "";
file_system_routines: FS_routines_type:= null_routines );

References:

unzip.ads:275:13 (declaration)
unzip.adb:418:5 (reference)
unzip.adb:665:13 (body)
unzip.adb:715:7 (label)

Called by:

Extract defined at unzip.ads:157:13

Calls:

To_Unbounded_String defined at a-strunb.ads:59:13
UnZip.UnZipFile defined at unzip.adb:15:13
Zip.Find_offset defined at zip.ads:191:13
Zip.Zip_name defined at zip.ads:86:12
Zip.Zip_stream defined at zip.ads:90:12
Zip_Streams.Close defined at zip_streams.ads:101:14
Zip_Streams.Open defined at zip_streams.ads:94:14
Zip_Streams.SetName defined at zip_streams.ads:50:14
Errors