Class: Xlsxrb::Ooxml::Cfb::DirEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/xlsxrb/ooxml/cfb.rb,
sig/generated/xlsxrb/ooxml/cfb.rbs

Overview

Represents a directory entry in a Compound File.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: "", type: OBJ_UNKNOWN, start_sector: ENDOFCHAIN, size: 0) ⇒ DirEntry

Returns a new instance of DirEntry.

Parameters:

  • name: (Object) (defaults to: "")
  • type: (Object) (defaults to: OBJ_UNKNOWN)
  • start_sector: (Object) (defaults to: ENDOFCHAIN)
  • size: (Object) (defaults to: 0)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/xlsxrb/ooxml/cfb.rb', line 30

def initialize(name: "", type: OBJ_UNKNOWN, start_sector: ENDOFCHAIN, size: 0)
  @name = name
  @type = type
  @color = 0 # Red / Black (0 is acceptable across OLE implementations)
  @left_sibling_id = NOSTREAM
  @right_sibling_id = NOSTREAM
  @child_id = NOSTREAM
  @clsid = "\x00".b * 16
  @state_flags = 0
  @created_time = 0
  @modified_time = 0
  @start_sector = start_sector
  @size = size
  @entry_id = 0
end

Instance Attribute Details

#child_idObject

Returns the value of attribute child_id.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def child_id
  @child_id
end

#clsidObject

Returns the value of attribute clsid.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def clsid
  @clsid
end

#colorObject

Returns the value of attribute color.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def color
  @color
end

#created_timeObject

Returns the value of attribute created_time.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def created_time
  @created_time
end

#entry_idObject

Returns the value of attribute entry_id.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def entry_id
  @entry_id
end

#left_sibling_idObject

Returns the value of attribute left_sibling_id.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def left_sibling_id
  @left_sibling_id
end

#modified_timeObject

Returns the value of attribute modified_time.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def modified_time
  @modified_time
end

#nameObject

Returns the value of attribute name.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def name
  @name
end

#right_sibling_idObject

Returns the value of attribute right_sibling_id.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def right_sibling_id
  @right_sibling_id
end

#sizeObject

Returns the value of attribute size.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def size
  @size
end

#start_sectorObject

Returns the value of attribute start_sector.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def start_sector
  @start_sector
end

#state_flagsObject

Returns the value of attribute state_flags.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def state_flags
  @state_flags
end

#typeObject

Returns the value of attribute type.

Returns:

  • (Object)


28
29
30
# File 'lib/xlsxrb/ooxml/cfb.rb', line 28

def type
  @type
end

Instance Method Details

#root?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/xlsxrb/ooxml/cfb.rb', line 50

def root?
  @type == OBJ_ROOT
end

#storage?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/xlsxrb/ooxml/cfb.rb', line 54

def storage?
  @type == OBJ_STORAGE
end

#stream?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/xlsxrb/ooxml/cfb.rb', line 46

def stream?
  @type == OBJ_STREAM
end