Module: JamfRubyExtensions::FileTest::Predicates

Included in:
FileTest
Defined in:
lib/jamf/ruby_extensions/filetest/predicates.rb

Instance Method Summary collapse

Instance Method Details

#j_real_file?(path) ⇒ Boolean Also known as: jss_real_file?

FileTest.file? returns true if the item is a symlink pointing to a regular file.

This test, real_file?, returns true if the item is a regular file but NOT a symlink.

Returns:

  • (Boolean)


38
39
40
# File 'lib/jamf/ruby_extensions/filetest/predicates.rb', line 38

def j_real_file?(path)
  FileTest.file?(path) && !FileTest.symlink?(path)
end