Sha256: 18907ce3b94488f584ade5d5f3ad20b7c07e512126fc0f3947b6888a3a92a8ac
Contents?: true
Size: 1.84 KB
Versions: 14
Compression:
Stored size: 1.84 KB
Contents
# this code is to list the links def fillhypernotelinkname(inffile) @a_viewlinksnote = inffile end def findnotelinkfiles(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 lnk files if x =~ /rb|lnk|lnk/ puts "#{x}" #opens the file thats in fileName as read only $noteslinksarray = $noteslinksarray | ["#{x}"] end end end end def rwdhypernotelistlinkdirs $noteslinksarray = [""] startlangdir = $rwdhypernote_directory puts startlangdir #get a list of the files and subdirectories on the starting directory only anotelinkarray = Array.new(Dir[startlangdir].entries.sort) p anotelinkarray #loop through the list, ignore the files and add all new directories found anotelinkarray.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 bnotelinkarray = Dir[@@tmproot].entries.sort bnotelinkarray.each do |x| p x if(test(?d,x)) anotelinkarray.push(x) #appends to the end of the array... end end end end anotelinkarray.each do |x| #if it is a file... if(!test(?d,x)) anotelinkarray.delete(x) else #it is a directory... findnotelinkfiles(x + "/**") end end @notelinksrecordsresult = $noteslinksarray.rwd_method("fillhypernotelinkname") end
Version data entries
14 entries across 14 versions & 2 rubygems