Skip to main content

[xadisk~svn:531] Changes for JIRA issue #123.

  • From: nitin_verma@...
  • To: commits@...
  • Subject: [xadisk~svn:531] Changes for JIRA issue #123.
  • Date: Sun, 11 Aug 2013 13:53:05 +0000

Project:    xadisk
Repository: svn
Revision:   531
Author:     nitin_verma
Date:       2013-08-11 13:53:02 UTC
Link:       

Log Message:
------------
Changes for JIRA issue #123.


Revisions:
----------
531


Modified Paths:
---------------
trunk/src/org/xadisk/filesystem/utilities/FileIOUtility.java


Diffs:
------
Index: trunk/src/org/xadisk/filesystem/utilities/FileIOUtility.java
===================================================================
--- trunk/src/org/xadisk/filesystem/utilities/FileIOUtility.java        
(revision 530)
+++ trunk/src/org/xadisk/filesystem/utilities/FileIOUtility.java        
(revision 531)
@@ -30,17 +30,10 @@
                         break;
                     }
                     if (!src.isDirectory()) {
-                        FileChannel srcFC = new 
FileInputStream(src).getChannel();
-                        FileChannel destFC = new 
FileOutputStream(dest).getChannel();
-                        long size = srcFC.size();
-                        long num = 0;
-                        while (num < size) {
-                            num += destFC.transferFrom(srcFC, num, 
NativeXAFileSystem.maxTransferToChannel(size - num));
-                        }
-                        srcFC.close();
-                        destFC.close();
-                                               
dest.setLastModified(src.lastModified());
+                        copyFile(src, dest, false);
+                        dest.setLastModified(src.lastModified());
                         deleteFile(src);
+                        break;
                     }
                 }
             } else {





[xadisk~svn:531] Changes for JIRA issue #123.

nitin_verma 08/11/2013
 
 
Close
loading
Please Confirm
Close