+ int src = DiskTool_int_TranslateOpen(Source, VFS_OPENFLAG_READ);
+ if( src == -1 ) {
+ Log_Error("DiskTool", "Unable to open %s for reading", Source);
+ return -1;
+ }
+ int dst = DiskTool_int_TranslateOpen(Destination, VFS_OPENFLAG_WRITE|VFS_OPENFLAG_CREATE);
+ if( dst == -1 ) {
+ Log_Error("DiskTool", "Unable to open %s for writing", Destination);
+ VFS_Close(src);
+ return -1;
+ }
+
+ char buf[1024];
+ size_t len, total = 0;
+ while( (len = VFS_Read(src, sizeof(buf), buf)) == sizeof(buf) )
+ VFS_Write(dst, len, buf), total += len;
+ VFS_Write(dst, len, buf), total += len;
+
+ Log_Notice("DiskTool", "Copied %i from %s to %s", total, Source, Destination);
+
+ VFS_Close(dst);
+ VFS_Close(src);
+
+ return 0;