Class: Yobi::Node

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

Overview

One file/directory entry from a Yobi::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)


118
119
120
# File 'lib/yobi/repository/ls.rb', line 118

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

#ctimeTime

Returns:

  • (Time)


122
123
124
# File 'lib/yobi/repository/ls.rb', line 122

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

#gidInteger

Returns:

  • (Integer)


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

def gid
  self["gid"]
end

#inodeInteger

Returns:

  • (Integer)


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

def inode
  self["inode"]
end

#mtimeTime

Returns:

  • (Time)


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

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

#nameString

Returns:

  • (String)


82
83
84
# File 'lib/yobi/repository/ls.rb', line 82

def name
  self["name"]
end

#pathString

Returns:

  • (String)


90
91
92
# File 'lib/yobi/repository/ls.rb', line 90

def path
  self["path"]
end

#permissionsString

Returns:

  • (String)


98
99
100
# File 'lib/yobi/repository/ls.rb', line 98

def permissions
  self["permissions"]
end

#sizeInteger

Returns:

  • (Integer)


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

def size
  self["size"]
end

#typeString

Returns:

  • (String)


86
87
88
# File 'lib/yobi/repository/ls.rb', line 86

def type
  self["type"]
end

#uidInteger

Returns:

  • (Integer)


102
103
104
# File 'lib/yobi/repository/ls.rb', line 102

def uid
  self["uid"]
end