Class: Yobi::Node

Inherits:
FancyHash show all
Defined in:
lib/yobi/repository/ls.rb,
sig/yobi.rbs

Overview

One file/directory entry from a Repository#ls call. Restic's own term for this is a "node" - the same structure it uses internally for every entry in a snapshot's tree, not just ones ls happens to show.

Instance Method Summary collapse

Methods inherited from FancyHash

#initialize, #inspect, #pretty_print

Constructor Details

This class inherits a constructor from Yobi::FancyHash

Instance Method Details

#atimeTime

Returns:

  • (Time)


140
141
142
# File 'lib/yobi/repository/ls.rb', line 140

def atime
  @atime ||= Time.parse(self["atime"])
end

#ctimeTime

Returns:

  • (Time)


145
146
147
# File 'lib/yobi/repository/ls.rb', line 145

def ctime
  @ctime ||= Time.parse(self["ctime"])
end

#gidInteger

Returns:

  • (Integer)


125
126
127
# File 'lib/yobi/repository/ls.rb', line 125

def gid
  self["gid"]
end

#inodeInteger

Returns:

  • (Integer)


130
131
132
# File 'lib/yobi/repository/ls.rb', line 130

def inode
  self["inode"]
end

#mtimeTime

Returns:

  • (Time)


135
136
137
# File 'lib/yobi/repository/ls.rb', line 135

def mtime
  @mtime ||= Time.parse(self["mtime"])
end

#nameString

Returns:

  • (String)


95
96
97
# File 'lib/yobi/repository/ls.rb', line 95

def name
  self["name"]
end

#pathString

Returns:

  • (String)


105
106
107
# File 'lib/yobi/repository/ls.rb', line 105

def path
  self["path"]
end

#permissionsString

Returns:

  • (String)


115
116
117
# File 'lib/yobi/repository/ls.rb', line 115

def permissions
  self["permissions"]
end

#sizeInteger

Returns:

  • (Integer)


110
111
112
# File 'lib/yobi/repository/ls.rb', line 110

def size
  self["size"]
end

#typeString

Returns:

  • (String)


100
101
102
# File 'lib/yobi/repository/ls.rb', line 100

def type
  self["type"]
end

#uidInteger

Returns:

  • (Integer)


120
121
122
# File 'lib/yobi/repository/ls.rb', line 120

def uid
  self["uid"]
end