Salesforce

ClientFileDelete (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

ClientFileDelete (Magic xpa 3.x)

Deletes a file from the disk, and returns a Boolean (TRUE, FALSE) indicating success or failure.

Syntax:

ClientFileDelete(file name)

Parameters:

file name – An Alpha string that represents the file name. The string may contain a path. If the path is not indicated, Magic xpa assumes the current directory.

Returns:

Success returns TRUE; failure returns FALSE.

Example:

ClientFileDelete('C:\TEMP\TMPFILE.TMP') - Deletes TMPFILE.TMP from the TEMP directory on Drive C.

Note:

It is advisable to use this function instead of using a Shell to OS internal event.

This is a client-side function that is only available for Rich Client tasks. To use the server-side version of this function in Rich Client tasks, see FileDelete.

Platform specific:

  • On iOS devices, only access to the temp folder is allowed. You can either use a relative path or use ClientOSEnvGet('temp') to get the folder.

  • On Android devices, the file system is case sensitive. The names of Magic xpa related files, such as images and local databases are automatically saved in lower case (even if the file is defined with upper case letters). This function will not convert the file name to lower case. Therefore, if you need to refer to the destination file from Magic xpa, you should use a lower case name in the function.

See also:

ClientFileCopy, ClientFileExist, ClientFileRename, ClientFileSize

The Rich Client Samples project (program REL15b)

Reference
Attachment 
Attachment