Class: WSSite

WSSite

Provides methods and properties for creating a new website


Members


<readonly> directory :string

Gets the directory name used for this app by the web server. The app is available at http://[ip addr of device]/app/[directory]/

Type:
  • string
Since:
  • 0.1 (WAT 2.0)

Methods


removeFile(path)

Remove a file from the web server at the specified path

Parameters:
Name Type Description
path string

The file path relative to the temporary directory

Since:
  • 0.1 (WAT 2.0)
Returns:

Indicates if the remove was successful

Type
bool

setFileContents(path, contents)

Add a file to the web server at the specified path

Parameters:
Name Type Description
path string

The file path relative to the temporary directory

contents string

The file contents

Since:
  • 0.1 (WAT 2.0)
Returns:

Indicates if the add was successful

Type
bool