Class: Pathname

Inherits:
Object show all
Includes:
JamfRubyExtensions::Pathname::Predicates, JamfRubyExtensions::Pathname::Utils
Defined in:
lib/jamf/ruby_extensions/pathname.rb

Overview

include the modules loaded above

Instance Method Summary collapse

Instance Method Details

#j_append(content) ⇒ Object Also known as: jss_append Originally defined in module JamfRubyExtensions::Pathname::Utils

Append some string content to a file.

Simpler than always using an open('a') block

#j_chown(usr, grp) ⇒ Object Also known as: jss_chown Originally defined in module JamfRubyExtensions::Pathname::Utils

Pathname should use FileUtils.chown, not File.chown

#j_cp(dest, **options) ⇒ Object Also known as: jss_cp Originally defined in module JamfRubyExtensions::Pathname::Utils

Copy a path to a destination

See Also:

  • FileUtils.cp

#j_cp_r(dest, **options) ⇒ Object Also known as: jss_cp_r Originally defined in module JamfRubyExtensions::Pathname::Utils

Recursively copy this path to a destination

See Also:

  • FileUtils.cp_r

#j_include?(other) ⇒ Boolean Also known as: jss_include? Originally defined in module JamfRubyExtensions::Pathname::Predicates

does a path include another? i.e. is 'other' a descendant of self ?

Returns:

  • (Boolean)

#j_real_file?Boolean Also known as: jss_real_file? Originally defined in module JamfRubyExtensions::Pathname::Predicates

Is this a real file rather than a symlink?

Returns:

  • (Boolean)

See Also:

  • FileTest.real_file

#j_save(content) ⇒ Object Also known as: jss_save Originally defined in module JamfRubyExtensions::Pathname::Utils

Write some string content to a file.

Simpler than always using an open('w') block CAUTION this overwrites files!

#j_touchObject Also known as: jss_touch Originally defined in module JamfRubyExtensions::Pathname::Utils

Touching can sometimes be good

See Also:

  • FileUtils.touch