如下的内容内容是关于C#中获取文件信息的内容,应该对大伙有一些好处。

FileInfo fi = new FileInfo(@"C:file.txt");

if(fi.Exists)
{
Console.WriteLine("Filename : {0}", fi.Name);
Console.WriteLine("Path : {0}", fi.FullName);
}




 

posted on 2019-04-23 10:34  odsxe  阅读(683)  评论(0编辑  收藏  举报