Module: FileTest

Extended by:
JamfRubyExtensions::FileTest::Predicates
Defined in:
lib/jss/ruby_extensions/filetest.rb,
lib/jamf/ruby_extensions/filetest.rb

Class Method Summary collapse

Class Method Details

.j_real_file?(path) ⇒ Boolean Originally defined in module JamfRubyExtensions::FileTest::Predicates

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)

.jss_real_file?(path) ⇒ Boolean

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)


35
36
37
# File 'lib/jss/ruby_extensions/filetest.rb', line 35

def FileTest.jss_real_file?(path)
  FileTest.file?(path) and not FileTest.symlink?(path)
end