Sha256: 5d1d6830c8a4e920052b4291fe852727f5cb15f1b64b737ded873503b03fb717
Contents?: true
Size: 1.56 KB
Versions: 2
Compression:
Stored size: 1.56 KB
Contents
# this code is to list the notes def fillhypernotenameh3(inffile) applet = inffile @a_viewhypernotehtml3 = applet end def findnotefilesh(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 txt files if x =~ /htm|html|pdf|pdb|gif|jpg|png|ps|chm|rwd|nam|sch|txt/ # puts "#{x}" #opens the file thats in fileName as read only $notesarray = $notesarray | ["#{x}"] end end end end def listnotedirshtml if $temp_rwdhypernote_directory.to_s.empty? startlangdir = $rwdhypernote_directory else startlangdir = $temp_rwdhypernote_directory end @hypernote_directory = startlangdir $notesarray = [""] #get a list of the files and subdirectories on the starting directory only anotearray = Array.new(Dir[startlangdir].entries.sort) #loop through the list, ignore the files and add all new directories found anotearray.each do |x| #if it is a file... if(!test(?d,x)) anotearray.delete(x) else #it is a directory... findnotefilesh(x + "/**") end end @notedirectoriesresult = "" @noterecordsresulth = $notesarray.entries.sort.rwd_method("fillhypernotenameh") end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rwdhypernote-0.15 | code/superant.com.hypernote/listnotedirshtml3.rb |
rwdhypernote-0.16 | code/superant.com.hypernote/listnotedirshtml3.rb |