addCompleteDirectory: aLocalURI
"adds a complete directory structure to the zip archive"
|directory slash dirLocalPath|
directory := FileDirectory on: aLocalURI.
"construct the directory name"
slash := directory slash.
dirLocalPath := directory localName, slash.
self addDirectoryDescend: directory relativePath: dirLocalPath.
addDirectory: aFileName as: anotherFileName
| newMember |
newMember := self memberClass newFromDirectory: aFileName.
newMember unixFileAttributes: 8r040755.
self addMember: newMember.
newMember localFileName: anotherFileName.
^newMember
addDirectoryDescend: directory relativePath: dirLocalPath
|slash|
"self break."
slash := directory slash.
"add the files"
self addDirectory: directory pathName as: dirLocalPath.
directory fileNames
do: [:fileName|
"self break."
self addFile: directory pathName, slash, fileName
as: dirLocalPath, fileName
].
directory directoryNames
do: [:subDirName| self addDirectoryDescend: (directory directoryNamed: subDirName)
relativePath: dirLocalPath, subDirName, slash.
].
--
===========================================================================
John M. McIntosh <
johnmci@smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.
http://www.smalltalkconsulting.com===========================================================================