enum Zip::OpenFlag
Overview
Flags for Archive
class methods that open archives, such as
Zip::Archive#new
, Zip::Archive#open
, and Zip::Archive#create
.
You can pass more than one flag by by ORing them together. For example:
# set CREATE and EXCL flags
flags = Zip::OpenFlag.flags(CREATE, EXCL).value
# open archive with specified flags
Zip::Archive.open("foo.zip", flags) do |zip|
# do stuff with zip here
zip.add("bar.txt", "hello")
end
Defined in:
zip/constants.crEnum Members
-
CREATE =
1
-
Create archive if it does not exist.
-
EXCL =
2
-
Raise error if archive already exists.
-
CHECKCONS =
4
-
Perform additional stricter consistency checks on the archive, and error if they fail.
-
TRUNCATE =
8
-
If archive exists, ignore its current conents. In other words, handle it in the same way as an empty archive.