Skip to content

Instantly share code, notes, and snippets.

@natemcmaster natemcmaster/Program.cs
Last active Sep 1, 2016

Embed
What would you like to do?
Which file attributes?
using System;
using System.IO;
class Program
{
static void Main(string[] args)
{
foreach (var file in args)
{
var attributes = new FileInfo(file).Attributes;
Console.WriteLine(file);
foreach (FileAttributes attr in Enum.GetValues(typeof(FileAttributes)))
{
if ((attributes & attr) != 0)
{
Console.WriteLine(" " + attr.ToString());
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.