System IO syntax error

Here is my script:


  Import System.IO;

  @MenuItem("Project Tools/MakeFolders")
  static function MakeFolder()
  {
      GenerateFolder();
  }
  static function GenerateFolder()
  {
      Debug.Log("HERE");
      Directory.CreateDirectory(Application.dataPath+"/Default Folder");
  }

and error is:

Assets/Editor/makeProjectFolder.js(4,7): UCE0001: ‘;’ expected. Insert a semicolon at the end.

But we have a semicolon after this statement.
Еhanks in advance

It’s “import” and not “Import”. Most programming languages are case sensitive, so watch out when you type names / keywords / …

Also System.IO has nothing to do with an URL so remove the http://

Unity Answers just sees the dot between System and IO and assumes it’s an URL because you haven’t marked your code as code.

If you are using Editor Scripts using java as Bunny says check import / Import. and in .Net 2.0 System.IO is namespace not an URL so you can’t use any internet protocols with it like http:// or https:// or ftp:// or file://
use just for java script import System.IO;
for c# using System.IO;

for java script “import System.IO;”

for c# “using System.IO;”

If you are using Editor Scripts using java as Bunny says check import / Import. and in .Net 2.0 System.IO is namespace not an URL so you can’t use any internet protocols with it like http:// or https:// or ftp:// or file:// use just

edit:

remove http:// beginning of namespace i don’t know what happen to answer editor