module Ronin::Support::Home

Represents the user’s home directory.

@api public

@since 1.0.0

Constants

CACHE_DIR

Path to the user’s ‘~/.cache/` directory.

CONFIG_DIR

Path to the user’s ‘~/.config/` directory.

DIR

Path to the user’s home directory.

LOCAL_SHARE_DIR

Path to the user’s ‘~/.local/share` directory.

Public Class Methods

cache_dir(subdir) click to toggle source

Returns the path to the sub-directory within the ‘~/.cache/` directory.

@param [String] subdir

The sub-directory.

@return [String]

The path to the `~/.cache/<subdir>` directory.
# File lib/ronin/support/home.rb, line 46
def self.cache_dir(subdir)
  File.join(CACHE_DIR,subdir)
end
config_dir(subdir) click to toggle source

Returns the path to the sub-directory within the ‘~/.config/` directory.

@param [String] subdir

The sub-directory.

@return [String]

The path to the `~/.config/<subdir>` directory.
# File lib/ronin/support/home.rb, line 64
def self.config_dir(subdir)
  File.join(CONFIG_DIR,subdir)
end
local_share_dir(subdir) click to toggle source

Returns the path to the sub-directory within the ‘~/.local/share/` directory.

@param [String] subdir

The sub-directory.

@return [String]

The path to the `~/.local/share/<subdir>` directory.
# File lib/ronin/support/home.rb, line 83
def self.local_share_dir(subdir)
  File.join(LOCAL_SHARE_DIR,subdir)
end