Skip to content
Daniel Berger edited this page Mar 6, 2016 · 2 revisions

Description

The win32-file-attributes gem adds methods and constants to the File class in core Ruby to support the reading and setting of various filesystem attributes that are unique to Microsoft Windows.

Usage

require 'win32-file-attributes'

file = "C:/some_file.txt"

p File.archive?(file)
p File.compressed?(file)
p File.encrypted?(file)
p File.hidden?(file)
Clone this wiki locally