Sha256: 99b4e5b01a0e92a475af3106605493ecbc7650348679798da8f805b34f948032
Contents?: true
Size: 807 Bytes
Versions: 5
Compression:
Stored size: 807 Bytes
Contents
module IRODS4r class IRODS4rException < Exception; end class NotFoundException < IRODS4rException; end class NoDirectoryException < IRODS4rException; end # Return a IRODS4r object for 'irodsPath' if it exists. # # @param [String] irodsPath Absolute path into iRODS # @param [Hash] opts Options to use for establishing context # @return [Directory|File] # def self.find(irodsPath = ".", opts = {}, ticket = nil) r = ICommands.ls(irodsPath, ticket) name = r.to_a[0].strip if name.end_with? ':' Directory.new(name[0 ... -1]) else File.new(name) end end # Return true if 'path' exists def self.exists?(path, ticket = nil) ICommands.exist?(path, ticket) end end require 'irods4r/directory' require 'irods4r/file' require 'irods4r/icommands'
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
omf_web-1.2.3 | lib/irods4r.rb |
omf_web-1.2.2 | lib/irods4r.rb |
omf_web-1.2.1 | lib/irods4r.rb |
omf_web-1.2.0 | lib/irods4r.rb |
omf_web-1.0.0 | lib/irods4r.rb |