Sha256: e412001e769ad2ba3b49bb6a8cabc28621526f12ab5d800854a2c574075ccbc6

Contents?: true

Size: 459 Bytes

Versions: 26

Compression:

Stored size: 459 Bytes

Contents

module Ftpd

  # Create temporary directories that will be removed when the program
  # exits.

  module TempDir

    # Create a temporary directory, returning its path.  When the
    # program exists, the directory (and its contents) are removed.

    def make
      Dir.mktmpdir.tap do |path|
        at_exit do
          FileUtils.rm_rf path
          Dir.rmdir path if File.exists?(path)
        end
      end
    end
    module_function :make

  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
ftpd-1.1.1 lib/ftpd/temp_dir.rb
ftpd-1.1.0 lib/ftpd/temp_dir.rb
investtools-ftpd-1.0.1 lib/ftpd/temp_dir.rb
ftpd-1.0.1 lib/ftpd/temp_dir.rb
ftpd-1.0.0 lib/ftpd/temp_dir.rb
ftpd-0.17.0 lib/ftpd/temp_dir.rb
ftpd-0.16.0 lib/ftpd/temp_dir.rb
ftpd-0.15.0 lib/ftpd/temp_dir.rb
ftpd-0.14.0 lib/ftpd/temp_dir.rb
ftpd-0.13.0 lib/ftpd/temp_dir.rb
ftpd-0.12.0 lib/ftpd/temp_dir.rb
ftpd-0.11.0 lib/ftpd/temp_dir.rb
ftpd-0.10.0 lib/ftpd/temp_dir.rb
ftpd-0.9.0 lib/ftpd/temp_dir.rb
ftpd-0.7.1 lib/ftpd/temp_dir.rb
ftpd-0.8.0 lib/ftpd/temp_dir.rb
ftpd-0.7.0 lib/ftpd/temp_dir.rb
ftpd-0.6.0 lib/ftpd/temp_dir.rb
ftpd-0.5.0 lib/ftpd/temp_dir.rb
ftpd-0.4.0 lib/ftpd/temp_dir.rb