def create_symlink(destPath)
stat = nil
begin
stat = ::File::lstat(destPath)
rescue Errno::ENOENT
end
io = get_input_stream
linkto = io.read
if stat
if stat.symlink?
if ::File::readlink(destPath) == linkto
return
else
raise ZipDestinationFileExistsError,
"Cannot create symlink '#{destPath}'. "+
"A symlink already exists with that name"
end
else
raise ZipDestinationFileExistsError,
"Cannot create symlink '#{destPath}'. "+
"A file already exists with that name"
end
end
::File::symlink(linkto, destPath)
end