Method: ShellHelpers::PathnameExt::Base#text?

Defined in:
lib/shell_helpers/pathname.rb

#text?Boolean

return true if the file is a text

Returns:

  • (Boolean)


178
179
180
181
182
# File 'lib/shell_helpers/pathname.rb', line 178

def text?
	#!! %x/file #{self.to_s}/.match(/text/)
	return false if directory?
	!binary?
end