Using System;
Using System.Collections;
Using System.Collections.Generic;
Using System.IO;
Using System.Linq;
Using System.Text;
Using Litjson;
Namespace Cshapetest {class Start {static void Main (string[] args) {////file attribute class
FileInfo FileInfo = new FileInfo ("Skill.json");
Gets whether the file exists//bool bexists = fileinfo.exists;
Console.WriteLine (bexists);
Gets the filename//string name = Fileinfo.name;
Console.WriteLine (name);
Get file Superior path//string directory = Fileinfo.directoryname;
Console.WriteLine (directory);
Gets whether the file is read-only//bool isreadonly = fileinfo.isreadonly;
Console.WriteLine (isreadonly); Directory attribute class DirectoryInfo DirectoryInfo = new DirectoryInfo (@ "C:\Users\chen\Documents\Visual Studio 2013\projects
\cshapetest\cshapetest\bin\debug ");
To get whether a directory exists bool bexists = directoryinfo.exists;
Console.WriteLine (bexists);
Gets the current directory string name = Directoryinfo.name;
Console.WriteLine (name);
Get parent Directory String parent = DirectoryInfo.Parent.ToString ();
Console.WriteLine (parent);
Gets the root string root = DirectoryInfo.Root.ToString ();
Console.WriteLine (root);
Console.ReadLine (); }
}
}