Execute following command
aqua.filesystem.copy("changelog.txt","defg") // line 32
where changelog.txt should be a file in your working directory & "defg" is the desired name of changelog.txt when copied
Receive following error:
Error on line 32: Wrapped java.lang.NullPointerException (#32)
Also, try the following variant:
aqua.filesystem.copy("changelog.txt","D:/") // line 32
where D:/ represents the dir location of the newly copied file.
No errors when running the above but changelog.txt is not copied to D:/
rev14640
aqua.filesystem.touch("test.txt", null);
aqua.filesystem.copy("test.txt", "testCopy1.txt");
aqua.filesystem.copy("c:\\Documents and Settings\\allan\\work\\ADS\\test.txt", "testCopy2.txt");
aqua.filesystem.copy("c:\\Documents and Settings\\allan\\work\\ADS\\", "c:\\tmp\\testCopy3.txt");
Is this a valid error message ?? I am trying to copy the file in source directory to c:/
var test_data_dir = "c://tmp//";
var AQFS = aqua.filesystem;
test_copyFile();
//--- copy a file ---
function test_copyFile() {
var src_base = test_data_dir;
//var dest_base = test_data_dir + "copy//";
var src_file = src_base + "index.html";
AQFS.copy(src_file, "C://");
}
Error on line 11: Wrapped Failed to copy c:\tmp\index.html to C:\Program Files\Aqua Data Studio 9.0 - 64bit\c: due to java.io.FileNotFoundException C:\Program Files\Aqua Data Studio 9.0 - 64bit\c: (The filename, directory name, or volume label syntax is incorrect) (#11)
Is this a valid error message ?? I am trying to copy the file in source directory to c:/
var test_data_dir = "c://tmp//";
var AQFS = aqua.filesystem;
test_copyFile();
//--- copy a file ---
function test_copyFile() {
var src_base = test_data_dir;
//var dest_base = test_data_dir + "copy//";
var src_file = src_base + "index.html";
AQFS.copy(src_file, "C://");
}
Error on line 11: Wrapped Failed to copy c:\tmp\index.html to C:\Program Files\Aqua Data Studio 9.0 - 64bit\c: due to java.io.FileNotFoundException C:\Program Files\Aqua Data Studio 9.0 - 64bit\c: (The filename, directory name, or volume label syntax is incorrect) (#11)
I still get this
aqua.filesystem.copy("changelog.txt","D:/") // line 32
where D:/ represents the dir location of the newly copied file.
NO ERRORS when running the above but changelog.txt is NOT COPIED to D:/
I still get this
aqua.filesystem.copy("changelog.txt","D:/") // line 32
where D:/ represents the dir location of the newly copied file.
NO ERRORS when running the above but changelog.txt is NOT COPIED to D:/
That's because you are trying to copy a file to a directory....
/**
* Copies a single file to another file or a directory to another directory.
* If the a file with the same name exist in the destination, it will be
* overwritten.
*
* @param file
* The file to be copied; required.
* @param destination
* The location of where the file will be copied; required.
* @throws Exception
* on error
*/
That's because you are trying to copy a file to a directory....
/**
* Copies a single file to another file or a directory to another directory.
* If the a file with the same name exist in the destination, it will be
* overwritten.
*
* @param file
* The file to be copied; required.
* @param destination
* The location of where the file will be copied; required.
* @throws Exception
* on error
*/
Closing this issue and opening a new issue instead: 4369
Closing this issue and opening a new issue instead: 4369
Issue #4288 |
Closed |
Won't Fix |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
rev14640
aqua.filesystem.touch("test.txt", null);
aqua.filesystem.copy("test.txt", "testCopy1.txt");
aqua.filesystem.copy("c:\\Documents and Settings\\allan\\work\\ADS\\test.txt", "testCopy2.txt");
aqua.filesystem.copy("c:\\Documents and Settings\\allan\\work\\ADS\\", "c:\\tmp\\testCopy3.txt");