Salesforce

ClientFileCopy (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

ClientFileCopy (Magic xpa 4.x)

Copies a file.

Syntax:

ClientFileCopy(origin,target)

Parameters:

origin – An alpha string that represents the file specification of the existing file to be copied.

target – An alpha string that represents the name of the new file.

Returns:

TRUE if successful

Example:

ClientFileCopy('MAGIC.FIL','MAGIC.SAV') - Copies MAGIC.FIL to a new file called MAGIC.SAV.

Note:

  • In each parameter the string may include a path. If the path is omitted, Magic xpa assumes the current directory.

  • 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 FileCopy.

Exceptions:

This function is not supported in Web Client tasks.

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.

  • On Android devices, when executing the ClientFileCopy function for the first time on a file placed in external storage, a request to approve the External permission will be shown to the user. (Since version: 3.2b)

See also:

ClientFileDelete, ClientFileExist, ClientFileRename, ClientFileSize

The Rich Client Samples project (program REL16b)

Reference
Attachment 
Attachment