A
Alessandro
Hi all,
I need to move some files (size often more than 1GB) into another
folder and only at the end of the move (in synchronous way) do other
actions.
I have problems to do in synchronous way, with following code it's
asynchronous:
//START CODE
{
moveFiles(startFold, targetFold);
//do other actions
}
public static void moveFiles(File sourceDir,File targetDir){
File[] fileList = sourceDir.listFiles();
for(File sourceFile : fileList)
sourceFile.renameTo(new File(targetDir,sourceFile.getName()));
}
//END CODE
Do you have any ideas ?
Thanks and best regards,
Alessandro
I need to move some files (size often more than 1GB) into another
folder and only at the end of the move (in synchronous way) do other
actions.
I have problems to do in synchronous way, with following code it's
asynchronous:
//START CODE
{
moveFiles(startFold, targetFold);
//do other actions
}
public static void moveFiles(File sourceDir,File targetDir){
File[] fileList = sourceDir.listFiles();
for(File sourceFile : fileList)
sourceFile.renameTo(new File(targetDir,sourceFile.getName()));
}
//END CODE
Do you have any ideas ?
Thanks and best regards,
Alessandro