Hackfut Security File Manager
Current Path:
/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/td-0.16.4/lib/td
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.4.0
/
gems
/
td-0.16.4
/
lib
/
td
/
📁
..
📁
command
📄
compact_format_yamler.rb
(1008 B)
📄
compat_core.rb
(162 B)
📄
compat_gzip_reader.rb
(393 B)
📄
config.rb
(3.71 KB)
📄
connector_config_normalizer.rb
(827 B)
📄
distribution.rb
(336 B)
📄
file_reader.rb
(14.6 KB)
📄
helpers.rb
(857 B)
📄
updater.rb
(11.38 KB)
📄
version.rb
(54 B)
Editing: helpers.rb
module TreasureData module Helpers module_function def format_with_delimiter(number, delimiter = ',') number.to_s.gsub(/(\d)(?=(?:\d{3})+(?!\d))/, "\\1#{delimiter}") end def home_directory on_windows? ? ENV['USERPROFILE'].gsub("\\","/") : ENV['HOME'] end def on_windows? RUBY_PLATFORM =~ /mswin32|mingw32/ end def on_mac? RUBY_PLATFORM =~ /-darwin\d/ end def on_64bit_os? if on_windows? if ENV.fetch('PROCESSOR_ARCHITECTURE', '').downcase.include? 'amd64' return true end return ENV.has_key?('PROCESSOR_ARCHITEW6432') else require 'open3' out, status = Open3.capture2('uname', '-m') raise 'Failed to detect OS bitness' unless status.success? return out.downcase.include? 'x86_64' end end end end
Upload File
Create Folder