~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to lib/rdoc/generators/html_generator.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
# HTML is generated using the Template class.
35
35
#
36
36
 
37
 
require 'ftools'
 
37
require 'fileutils'
38
38
 
39
39
require 'rdoc/options'
40
40
require 'rdoc/template'
1025
1025
    
1026
1026
    def create_source_code_file(code_body)
1027
1027
      meth_path = @html_class.path.sub(/\.html$/, '.src')
1028
 
      File.makedirs(meth_path)
 
1028
      FileUtils.mkdir_p(meth_path)
1029
1029
      file_path = File.join(meth_path, @seq) + ".html"
1030
1030
 
1031
1031
      template = TemplatePage.new(RDoc::Page::SRC_PAGE)
1235
1235
    # directory structure
1236
1236
 
1237
1237
    def gen_sub_directories
1238
 
      File.makedirs(FILE_DIR, CLASS_DIR)
 
1238
      FileUtils.mkdir_p(FILE_DIR)
 
1239
      FileUtils.mkdir_p(CLASS_DIR)
1239
1240
    rescue 
1240
1241
      $stderr.puts $!.message
1241
1242
      exit 1
1289
1290
      list.each do |item|
1290
1291
        if item.document_self
1291
1292
          op_file = item.path
1292
 
          File.makedirs(File.dirname(op_file))
 
1293
          FileUtils.mkdir_p(File.dirname(op_file))
1293
1294
          File.open(op_file, "w") { |file| item.write_on(file) }
1294
1295
        end
1295
1296
      end