# Site

Site Static Function

void Site.Load()

Load site list from the default file "site.json".

void Site.Save()

Save site list to the default file "site.json".

void Site.Import(string filepath)

Import site list from another file.

void Site.Export(string filepath)

Export site list to another file.

void Site.Add(string name, Server server)

Add server to the site list and name it.

If you want to add a server to a folder, you must use full path name.

Server google_server = new Server { Protocol = ServerProtocol.GoogleDrive}; // Create Google Drive server Site.Add("Test/demo",google_server); // Add to Site Manager

void Site.Remove(string name)

Remove a site.

Server Site.GetServer(string name)

Get the server from site name.

Server demo_server = Site.GetServer("Test/demo"); // Get the "Test/demo" server if(demo_server != null) //Check if the "Test/demo" server exists { demo_server.DefaultLocalPath = "C:/Test"; //Modify the server demo_server.BookMarks.Add(new BookMark{Name = "bookmark 1", Path = "/download"}); }

Task Site.Connect(Server server)

Connect to a server directly.

Server google_server = new Server { Protocol = ServerProtocol.GoogleDrive}; // Create Google Drive server Site.Connect(google_server); // Connect to server

Task Site.Connect(string name)

Connect to a server by name in the Site Manager.

The name must be full path name.

Server google_server = new Server { Protocol = ServerProtocol.GoogleDrive}; // Create Google Drive server Site.Add("Test/demo",google_server); // Add to Site Manager Site.Connect("Test/demo"); // Connect to "Test/demo" server