Sha256: 7a6959e64807dfa19e1e90d86a41a519f58571a6aadb4ad76b0a0b78442b4b9a

Contents?: true

Size: 1.52 KB

Versions: 2

Compression:

Stored size: 1.52 KB

Contents

# this code is to list the notes



def fillhypernotenameh2(inffile)
  applet                = inffile
  @a_viewhypernote2  = applet
  
end

 def findnotefilesh2(d)
   notesarray = [""]
         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|nam|rwd|sch|txt/
                  #  puts "#{x}"        #opens the file thats in fileName as read only
                   notesarray =  notesarray | ["#{x}"] 
                  end
               end
       end
       return notesarray
  end
  
def listnotedirshtml2

if $temp_rwdhypernote_directory2.to_s.empty?
 startlangdir = $rwdhypernote_directory
 else
 startlangdir = $temp_rwdhypernote_directory2
 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 it is a file...
		
                if(!test(?d,x))
                        anotearray.delete(x)
                  else              #it is a directory...
                     notesarray =   findnotefilesh2(x + "/**")
                end
        end
        
         @noterecordsresult2 = notesarray.entries.sort.rwd_method("fillhypernotenameh2")
      end  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rwdhypernote-0.16 code/superant.com.hypernote/listnotedirshtml2.rb
rwdhypernote-0.15 code/superant.com.hypernote/listnotedirshtml2.rb