ZipArchive.st
changeset 4373 b6af52242a52
parent 4372 071c7186de7b
child 4374 57cd89038719
--- a/ZipArchive.st	Tue May 30 17:17:09 2017 +0200
+++ b/ZipArchive.st	Tue May 30 18:36:04 2017 +0200
@@ -1073,7 +1073,7 @@
 
     zip := ZipArchive oldFileNamed:'foo.zip'.
     bytes := zip extract:'bar'.
-    zip closeFile.
+    zip close.
                                                         [exEnd]
 
                                                         [exBegin]
@@ -1083,7 +1083,7 @@
     zip entries do:[:entry |
         Transcript showCR:entry
     ].
-    zip closeFile.
+    zip close.
                                                         [exEnd]
 
                                                         [exBegin]
@@ -1091,7 +1091,7 @@
 
     zip := ZipArchive oldFileNamed:'source/stx/libbasic2.zip'.
     bytes := zip extract:'TwoByteStr.st'.
-    zip closeFile.
+    zip close.
     Transcript showCR:(bytes asString).
                                                         [exEnd]
 
@@ -1105,7 +1105,7 @@
 
     zipwr := ZipArchive newFileNamed:(testDirectory, testFileWr).
     zipwr addFile:'crcTest_resume_compressed.txt' withContents: 'resume'.
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
     compatibility read check with winzip (compressed with deflate)
@@ -1118,7 +1118,7 @@
     ziprd := ZipArchive oldFileNamed:(testDirectory, testFileRd).
     contents := ziprd extract: ziprd entries first.
     contents inspect.
-    ziprd closeFile.
+    ziprd close.
                                                         [exEnd]
 
     compatibility write check with winzip (uncompressed)
@@ -1130,12 +1130,12 @@
 
     zipwr := ZipArchive newFileNamed:(testDirectory, testFileWr).
 
-    zipwr addFile:'crcTest_resume_uncompressed.txt' 
-        withContents:'resume' 
-       compressMethod:0 
+    zipwr addFile:'crcTest_resume_uncompressed.txt'
+        withContents:'resume'
+       compressMethod:0
           asDirectory:false.
 
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
     compatibility read check with winzip (uncompressed)
@@ -1148,10 +1148,10 @@
     ziprd := ZipArchive oldFileNamed:(testDirectory, testFileRd).
     contents := ziprd extract: ziprd entries first.
     contents inspect.
-    ziprd closeFile.
+    ziprd close.
                                                         [exEnd]
 
-    read an archive with files and/or directories, fetch the entries 
+    read an archive with files and/or directories, fetch the entries
     and create a new archive with the same content
                                                         [exBegin]
     |ziprd zipwr entryDict testDirectory testFileRd testFileWr|
@@ -1165,7 +1165,7 @@
     ziprd entries do: [:aFileName|
         entryDict at:aFileName put:(ziprd extract: aFileName) asString.
     ].
-    ziprd closeFile.
+    ziprd close.
 
     zipwr := ZipArchive newFileNamed:(testDirectory, testFileWr).
     entryDict keysAndValuesDo: [:key :value|
@@ -1175,7 +1175,7 @@
             zipwr addFile:key withContents:value
         ].
     ].
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
                                                         [exBegin]
@@ -1219,8 +1219,8 @@
     ziprd close.
                                                         [exEnd]
 
-    read an archive with files and/or directories and/or zipArchives, 
-    fetch the entries (also from the include zip archives) 
+    read an archive with files and/or directories and/or zipArchives,
+    fetch the entries (also from the include zip archives)
     and create a new archive
                                                         [exBegin]
     |ziprd zipwr entryDict testDirectory testFileRd testFileWr zipRdSub1 zipRdSub2|
@@ -1247,17 +1247,17 @@
                             entryDict at:aFileName2 put:(zipRdSub2 extract: aFileName2) asString.
                         ].
                     ].
-                    zipRdSub2 closeFile.
+                    zipRdSub2 close.
                 ] ifFalse: [
                     entryDict at:aFileName1 put:(zipRdSub1 extract: aFileName1) asString.
                 ].
             ].
-            zipRdSub1 closeFile.
+            zipRdSub1 close.
         ] ifFalse: [
             entryDict at:aFileName put:(ziprd extract: aFileName) asString.
         ].
     ].
-    ziprd closeFile.
+    ziprd close.
 
     zipwr := ZipArchive newFileNamed:(testDirectory, testFileWr).
     entryDict keysAndValuesDo: [:key :value|
@@ -1267,7 +1267,7 @@
             zipwr addFile:key withContents:value
         ].
     ].
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
 "
@@ -1291,7 +1291,7 @@
     zipwr addFile:'crcTest_resume_compressed.txt' withContents: 'resume'.
     zipwr addFile:rdStreamFile fromStream: rdFileStream.
 
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
     read from zip archive a entry into memory using selector
@@ -1313,14 +1313,14 @@
         self halt.
     ].
 
-    ziprd closeFile.
+    ziprd close.
     wrFileStream close.
                                                         [exEnd]
 
     add (compressed) to new zip archive a real file contents from disk e.g. a pdf
     identified by a readStream
     using selector
-        addFile:  fromStream:  compressMethod: 
+        addFile:  fromStream:  compressMethod:
                                                         [exBegin]
     |zipwr testDirectory testFileWr rdStreamFile rdFileStream|
 
@@ -1332,13 +1332,13 @@
     zipwr := ZipArchive newFileNamed:(testDirectory, testFileWr).
     zipwr addFileCompressed:rdStreamFile fromStream: rdFileStream.
 
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
-    read from zip archive a compressed entry e.g. a pdf and store the contents 
+    read from zip archive a compressed entry e.g. a pdf and store the contents
     to disk using a readStream
     using selector
-        readStreamFor: rdStreamFile 
+        readStreamFor: rdStreamFile
                                                         [exBegin]
     |ziprd testDirectory testFileRd wrStreamFile wrFileStream|
 
@@ -1353,7 +1353,7 @@
         self halt.
     ].
 
-    ziprd closeFile.
+    ziprd close.
     wrFileStream close.
                                                         [exEnd]
 
@@ -1375,7 +1375,7 @@
 
     zipwr addArchiveDirectory: 'attachments' fromOsDirectory: (testDirectory,zipDirectory).
 
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
     read from zip archive all entries which are stored in an archive directory (uncompressed)
@@ -1390,7 +1390,7 @@
 
     ziprd := ZipArchive oldFileNamed:(testDirectory, testFileRd).
     ziprd restoreOsDirectory: (testDirectory,zipDirectory) fromArchiveDirectory: 'attachments'.
-    ziprd closeFile.
+    ziprd close.
                                                         [exEnd]
 
 
@@ -1407,7 +1407,7 @@
 
     zipwr addArchiveDirectoryCompressed: 'attachments' fromOsDirectory: (testDirectory,zipDirectory).
 
-    zipwr closeFile.
+    zipwr close.
                                                         [exEnd]
 
     read from zip archive all entries which are stored in an archive directory (compressed)
@@ -1422,7 +1422,7 @@
 
     ziprd := ZipArchive oldFileNamed:(testDirectory, testFileRd).
     ziprd restoreOsDirectory: (testDirectory,zipDirectory) fromArchiveDirectory: 'attachments'.
-    ziprd closeFile.
+    ziprd close.
                                                         [exEnd]
 
 "