Sha256: 17646317b3f94a5779879adc6d63f6b20aba7a54ef0492b383b88986917cc194
Contents?: true
Size: 704 Bytes
Versions: 7
Compression:
Stored size: 704 Bytes
Contents
class FileSystem < ApplicationRecord def path_modified_at(path) case machine_readable_identifier when 'local' File.mtime(path.file_system_path) when 'dropbox' if file?(path) Time.parse(path.dropbox_metainfo['server_modified']) else return nil end end end def file?(path) case machine_readable_identifier when 'local' File.file?(path.file_system_path) when 'dropbox' path.dropbox_metainfo[".tag"] == 'file' end end # def self.find_by(*args) # @cached ||= {} # @cached[args.join(',')] # end end
Version data entries
7 entries across 7 versions & 2 rubygems