Sha256: 7ccd41fcab3ceffe035cc51f95f02150bcb6a99040422f0e279d00cdeb25d4b9
Contents?: true
Size: 1.94 KB
Versions: 4
Compression:
Stored size: 1.94 KB
Contents
# this code is to list the notes def fillhypernotename(inffile) applet = inffile @a_viewhypernote = applet end def findnotefiles(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|txt|html/ # puts "#{x}" #opens the file thats in fileName as read only $notesarray = $notesarray | ["#{x}"] end end end end def listnotedirs if $temp_rwdhypernote_directory.to_s.empty? startlangdir = $rwdhypernote_directory else startlangdir = $temp_rwdhypernote_directory end $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 a directory... if(test(?d,x)) # add to the original list of directories @@tmproot = x + "/**" #adds the new ones to the array bnotearray = Dir[@@tmproot].entries.sort bnotearray.each do |x| if(test(?d,x)) anotearray.push(x) #appends to the end of the array... end end end end anotearray.each do |x| #if it is a file... if(!test(?d,x)) anotearray.delete(x) else #it is a directory... findnotefiles(x + "/**") end end @notedirectoriesresult = "" @noterecordsresult = $notesarray.entries.sort.rwd_method("fillhypernotename") end
Version data entries
4 entries across 4 versions & 1 rubygems