Sha256: 0d0d4d6c0f305356ea25a55fb84b6f894eba97fc6d1941bf85273c082c075550
Contents?: true
Size: 1.77 KB
Versions: 1
Compression:
Stored size: 1.77 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 #get a list of the files and subdirectories on the starting directory only alanghash = Array.new(Dir[startlangdir].entries.sort) #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... findnotelinkfiles(x + "/**") end end @notelinksrecordsresult = $noteslinksarray.rwd_method("fillhypernotelinkname") end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rwdhypernote-0.03 | code/superant.com.hypernote/listhypernotelinks.rb |