Sha256: 03e27cd099ed8863a7317846ff145848cb6c269bba1e17e865f8466856a09bd2

Contents?: true

Size: 1.83 KB

Versions: 3

Compression:

Stored size: 1.83 KB

Contents

# this code is to list the zips


def fillhypernotename(inffile)
  applet                = inffile.gsub(/\.zip$/, "")
  @a_installapplet = applet
  
end

 def slippersfindzipfiles(d)
         a = Array.new(Dir[d].entries.sort)
         #loop through and get the files names
         a.each do |x|
               #adjust the filters to the files you want to see...
               if(!test(?d,x))
               # only zip files
                  if x =~ /\.zip/
                    puts "#{x}"        #opens the file thats in fileName as read only
                   $zipsarray =  $zipsarray | ["#{x}"] 
                  end
               end
          end
  end
  
def slipperslistgemzips
 begin
 startlangdir = $geminstalled_directory
 #get a list of the files and subdirectories on the starting directory only
        alanghash = Array.new(Dir[startlangdir].entries.sort)
        p alanghash
        #loop through the list, ignore the files and add all new directories found
        alanghash.each do |x|
          #if a directory...
          if(test(?d,x))
            # add to the original list of directories
            @@tmproot = x + "/**"
            #adds the new ones to the array
            blanghash = Dir[@@tmproot].entries.sort
            blanghash.each do |x|
              if(test(?d,x))
                alanghash.push(x)  #appends to the end of the array...
              end
            end
          end
        end
        alanghash.each do |x|
                #if it is a file...
                if(!test(?d,x))
                        alanghash.delete(x)
                  else              #it is a directory...
                        slippersfindzipfiles(x + "/**")
                end
        end
         @zipslistresult = $zipsarray.rwd_method("fillhypernotename")
rescue 
 @zipslistresult = "file error"
end
      end  

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyslippers-1.06 code/superant.com.rubyslippers/listgemzips.rb
rubyslippers-1.07 code/superant.com.rubyslippers/listgemzips.rb
rubyslippers-1.08 code/superant.com.rubyslippers/listgemzips.rb