deleteSystemFile()

Pixelsilk API function to remove a system file--requires the advanced-admin-access permission
Parameters:
filename: the name of the file to be deleted

Output:
The function deleteSystemFile returns void.

C# Example:
string filename = "fileName";
DeleteSystemFile(filename);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/deleteSystemFile HTTP/1.1
HOST: www.example.com
Content-Length: 97
Content-Type: application/x-www-form-urlencoded
Cookie: auth=CF1A0F4426C9...E8100AFFA8B2

Request Data:
Unencoded Data:
json={
   "filename":"example.txt"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=FE118F7D02E4...92D950230FC; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

JavaScript Example:
Method Call:
pixelsilk2.deleteSystemFile(input, callback);

Input Object:
{
    filename:"SystemFile.txt"
}

Returned Data:
{}

Back to Files »