class EziiOsPath

Attributes

complementary_local_file_system_paths[RW]
dropbox_metainfo[RW]
file_system[RW]
global_path[RW]
https_url[RW]
local_file_system_path[RW]

Public Class Methods

new(global_path) click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 9
def initialize(global_path)
  self.global_path = global_path
  self.file_system = FileSystem.find_by(machine_readable_identifier: file_system_identifier)
  self.complementary_local_file_system_paths = []
end

Public Instance Methods

file?() click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 39
def file?
  self.file_system.file?(self)
end
file_system_identifier() click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 19
def file_system_identifier
  global_path.match(/\/([^\/]+)/)[1]
end
file_system_path() click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 15
def file_system_path
  global_path.sub(/\A(?:\/)?#{self.file_system.machine_readable_identifier}/, '')
end
hacky_split_path(*args) click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 27
def hacky_split_path(*args)
  to_s.split(*args)
end
inspect() click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 35
def inspect
  "#{self.class.name}#inspect:  #{global_path}"
end
modified_at() click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 43
def modified_at
  self.file_system.path_modified_at(self)
end
split(*args) click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 31
def split(*args)
  hacky_split_path(*args)
end
to_s() click to toggle source
# File server/redux-os/app/models/ezii_os_path.rb, line 23
def to_s
  return file_system_pat
end