get file attributes
Published: 25. October 2011 | Updated: 25. October 2011License: Microsoft Public License (MS-PL)
Categories: File system » Files
Tags: C# Windows
Import namespace
using System.IO;
Code
string path = @"C:\Folder\test.txt"; FileAttributes attributes = File.GetAttributes(path); Console.WriteLine(attributes);Console Output:
ReadOnly, Archive, Compressed
| Send us feedback about this snippet » |





