EasyManua.ls Logo

Topcon OPUS A6G2 - Page 555

Topcon OPUS A6G2
800 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
555
OPUS Projektor Manual
JavaScript
//copy the directory /opt/test_dir inluding all its content
to /opt/parent_dir (resulting in /opt/parent_dir/test_dir
copyFileOrDirectory("/opt/test_dir/","/opt/parent_dir/");
Please note: This function blocks the execution until it is finished. Blocks means: The thread
that caused the execution of the script will block. Usually this is the PClient main thread
including any painting operation. The programmer is advised to show a warning to the device
user when a blocking function is called.
If the script was triggered e.g. by a CAN stack (e.g. timeout or received event), it will also
block that thread and will e.g. not send cyclic messages during the block!
The time it takes to finish this function depends on the size of the copied data.
moveFileOrDirectory - Move file(s) or directory/ies
This function moves a file or directory or files or directories within the file system (including
USB stick). A file or directory can only be moved if it is either on a USB stick or in the
user_files directory (/opt/user_files).
The two (obligatory) parameters are the source and destination file path.
Return value is 'true' if the move process was successful.
Return value is false if the move process was not successful or if the parameters were invalid
or missing.
Prototype:
var success = moveFileOrDirectory(String sourcePath, String
destinationPath);
Examples:
//move the file test.txt from /opt/user_files to /opt/test
moveFileOrDirectory("/opt/user_files/test.txt","/opt/test/");
//move the file test.txt from /opt/user_files to /opt/test and
rename it test2.txt
moveFileOrDirectory("/opt/user_files/test.txt","/opt/test/test2
.txt");
//move all files from /opt/user_files/test_dir1
to /opt/test_dir2
moveFileOrDirectory("/opt/user_files/test_dir1/*","/opt/test_di
r2/");
//move the directory /opt/user_files/test_dir inluding all its
content to /opt/parent_dir (resulting
in /opt/parent_dir/test_dir
copyFileOrDirectory("/opt/user_files/test_dir/","/opt/parent_di
r/");
Please note: This function blocks the execution until it is finished. Blocks means: The thread
that caused the execution of the script will block. Usually this is the PClient main thread

Table of Contents