X7ROOT File Manager
Current Path:
/opt/alt/ruby40/share/ruby
opt
/
alt
/
ruby40
/
share
/
ruby
/
??
..
??
English.rb
(5.96 KB)
??
bigdecimal
??
bundled_gems.rb
(8.41 KB)
??
cgi
??
cgi.rb
(311 B)
??
coverage.rb
(517 B)
??
date.rb
(1.17 KB)
??
delegate.rb
(11.96 KB)
??
did_you_mean
??
did_you_mean.rb
(4.51 KB)
??
digest
??
digest.rb
(3.3 KB)
??
erb
??
erb.rb
(32.57 KB)
??
error_highlight
??
error_highlight.rb
(84 B)
??
expect.rb
(2.19 KB)
??
fileutils.rb
(79.18 KB)
??
find.rb
(2.54 KB)
??
forwardable
??
forwardable.rb
(8.81 KB)
??
io
??
ipaddr.rb
(22.86 KB)
??
json
??
json.rb
(21.45 KB)
??
mkmf.rb
(93.16 KB)
??
monitor.rb
(6.97 KB)
??
net
??
objspace
??
objspace.rb
(4.14 KB)
??
open-uri.rb
(28.58 KB)
??
open3
??
open3.rb
(47.51 KB)
??
openssl
??
openssl.rb
(1.24 KB)
??
optionparser.rb
(59 B)
??
optparse
??
optparse.rb
(65.44 KB)
??
pathname.rb
(2 KB)
??
pp.rb
(19.21 KB)
??
prettyprint.rb
(15.95 KB)
??
prism
??
prism.rb
(3.74 KB)
??
psych
??
psych.rb
(26.05 KB)
??
random
??
resolv.rb
(88.39 KB)
??
ripper
??
ripper.rb
(2.44 KB)
??
securerandom.rb
(2.28 KB)
??
set
??
shellwords.rb
(7.53 KB)
??
singleton.rb
(5.59 KB)
??
socket.rb
(61.26 KB)
??
strscan
??
syntax_suggest
??
syntax_suggest.rb
(74 B)
??
tempfile.rb
(20.7 KB)
??
time.rb
(24.01 KB)
??
timeout.rb
(10.48 KB)
??
tmpdir.rb
(5.62 KB)
??
tsort.rb
(14.36 KB)
??
un.rb
(11.17 KB)
??
unicode_normalize
??
uri
??
uri.rb
(3.09 KB)
??
vendor_ruby
??
weakref.rb
(1.39 KB)
??
yaml
??
yaml.rb
(2.16 KB)
Editing: pathname.rb
# frozen_string_literal: true # # = pathname.rb # # Object-Oriented Pathname Class # # Author:: Tanaka Akira <akr@m17n.org> # Documentation:: Author and Gavin Sinclair # # For documentation, see class Pathname. # class Pathname # * Find * # # Iterates over the directory tree in a depth first manner, yielding a # Pathname for each file under "this" directory. # # Note that you need to require 'pathname' to use this method. # # Returns an Enumerator if no block is given. # # Since it is implemented by the standard library module Find, Find.prune can # be used to control the traversal. # # If +self+ is +.+, yielded pathnames begin with a filename in the # current directory, not +./+. # # See Find.find # def find(ignore_error: true) # :yield: pathname return to_enum(__method__, ignore_error: ignore_error) unless block_given? require 'find' if @path == '.' Find.find(@path, ignore_error: ignore_error) {|f| yield self.class.new(f.delete_prefix('./')) } else Find.find(@path, ignore_error: ignore_error) {|f| yield self.class.new(f) } end end end class Pathname # * FileUtils * # Recursively deletes a directory, including all directories beneath it. # # Note that you need to require 'pathname' to use this method. # # See FileUtils.rm_rf def rmtree(noop: nil, verbose: nil, secure: nil) # The name "rmtree" is borrowed from File::Path of Perl. # File::Path provides "mkpath" and "rmtree". require 'fileutils' FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure) self end end class Pathname # * tmpdir * # Creates a tmp directory and wraps the returned path in a Pathname object. # # Note that you need to require 'pathname' to use this method. # # See Dir.mktmpdir def self.mktmpdir require 'tmpdir' unless defined?(Dir.mktmpdir) if block_given? Dir.mktmpdir do |dir| dir = self.new(dir) yield dir end else self.new(Dir.mktmpdir) end end end
Upload File
Create Folder