Sha256: f820ce05e7387c3443ed4cb2ab6f34399a5a277ef3645cf86b5c3ad0351ff108
Contents?: true
Size: 347 Bytes
Versions: 12
Compression:
Stored size: 347 Bytes
Contents
require 'win32ole' class File def self.read_only?(path) raise "'#{path}' does not exist" unless(File.exists?(path)) fso = WIN32OLE.new('Scripting.FileSystemObject') raise 'Failed to create Scripting.FileSystemObject' if(fso.nil?) fo = fso.GetFile(path) return ((fo.Attributes & 1) != 0) ? true : false end end
Version data entries
12 entries across 12 versions & 1 rubygems