enum Zip::StatFlag

Overview

Flags used to indicate which fields are valid in a LibZip::Stat structure. Check the valid field after a call to Archive#stat before accessing a given field.

Example

# get file stats and wrap valid field
st = zip.stat("foo.txt")
valid = Zip::StatFlag.new(st.valid)

# is file size valid?
if valid.size?
  # print file size
  puts "file size: #{st.size}"
end

Defined in:

zip/constants.cr

Enum Members

NAME = 1

name: name of the file

INDEX = 2

index: index within archive

SIZE = 4

size: size of the file (uncompressed)

COMP_SIZE = 8

comp_size: size of the file (compressed)

MTIME = 16

mtime: modification time

CRC = 32

crc: crc of file data

COMP_METHOD = 64

comp_method: compression method used

ENCRYPTION_METHOD = 128

enc_method: encryption method used

FLAGS = 256

reserved for future use

Instance Method Summary

Instance Method Detail

def comp_method? #

[View source]
def comp_size? #

[View source]
def crc? #

[View source]
def encryption_method? #

[View source]
def flags? #

[View source]
def index? #

[View source]
def mtime? #

[View source]
def name? #

[View source]
def none? #

[View source]
def size? #

[View source]