Get File Attributes from FileInfo : File Info : File Stream C# Source Code


Custom Search

C# Source Code » File Stream » File Info »

 

Get File Attributes from FileInfo








    


using System;
using System.IO;
class Class1 {
    static void Main(string[] args) {
        string[] cla = Environment.GetCommandLineArgs();
        if (cla.GetUpperBound(0) == 1) {
            FileInfo fi = new FileInfo(cla[1]);
            fi.Delete();
            Console.WriteLine("File      : " + cla[1]);
            Console.WriteLine("Attributes: " + fi.Attributes.ToString());
            Console.WriteLine("File Deleted...");
        } else
            Console.WriteLine("Usage: rm <filename>");
    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo File Stream
» File Info