You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 26, 2019. It is now read-only.
frenzylabs edited this page Dec 14, 2010
·
1 revision
CoreJS System library is to provide some basic system level functions commonly used for server/desktop side.
Global system methods:
// Print to the console/stdoutprint("Hello World");
System object methods:
// Print to console/stdout (aliased global)System.print("Hello World");// Print to console/stdout with new lineSystem.println("Hello World");// Read the contents of a file, return a string.varfileContents=System.readfile("/path/to/file");// Get current working directoryvarcwd=System.cwd();// Chmod (GNU) commandSystem.chmod("/path/to/item",0777);// Move/rename a file/directorySystem.mv("/from/path","/to/path");// Test if an item existsSystem.exists("/path/to/something");// Test if something can be written to:System.isWritable("/path/to/item");// Test if something can be read:System.isReadable("/path/to/item");// Exit the process, terminate.System.exit(0);