def self.attributes(file)
attributes = GetFileAttributes(file)
arr = []
if attributes == INVALID_FILE_ATTRIBUTES
raise ArgumentError, get_last_error
end
arr.push('archive') if archive?(file)
arr.push('compressed') if compressed?(file)
arr.push('directory') if directory?(file)
arr.push('encrypted') if encrypted?(file)
arr.push('hidden') if hidden?(file)
arr.push('indexed') if indexed?(file)
arr.push('normal') if normal?(file)
arr.push('offline') if offline?(file)
arr.push('readonly') if readonly?(file)
arr.push('reparse_point') if reparse_point?(file)
arr.push('sparse') if sparse?(file)
arr.push('system') if system?(file)
arr.push('temporary') if temporary?(file)
arr
end