存储设备,文件传输和复制操作逻辑 [英] Storage devices, file transfer and copy operation logic

查看:144
本文介绍了存储设备,文件传输和复制操作逻辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个文件复制实用程序,它可以替代标准的Windows文件复制过程。这样做的主要原因是添加复制/移动队列支持,并希望通过仅在文件传输不涉及相同目标物理介质时启用多个文件传输进行某种优化(您知道当存在时总体传输速率如何下降)使用相同的目标媒体进行多次传输?)

I am trying to create a file copy utility which should work as a replacement of the standard windows file copying process. The main reason to do so is to add copy/move queue support and hopefully some sort of optimisation by enabling multiple file transfers only when the file transfers would not involve the same destination physical media(You know how the overall transfer rate drops when there are multiple transfers going on with the same destination media?)

我想澄清一点,我几乎没有真正的编程经验。我打算在项目中使用C#/ .net。

I would like to clarify that I have had almost no real world programming experience. I intend to use C#/.net for the project.

本质上,我打算创建类似于teracopy的功能(如果没有相同的性能提升)。

In essence, I intend to create something similar in functionality as teracopy(if not with the same performance gains).

以下是我需要专家建议的几件事:

Here are the few things I need expert advice on:

文件如何复制/移动速度取决于存储介质(硬盘,闪存驱动器等)?

从一个硬盘到操作的读/写速度另一种。(例如,将文件从硬盘A复制到B,从A复制到A )。

什么样的同时复制/如果同时执行,移动操作不会对彼此产生显着影响(我不考虑处理器或设备控制器上的负载... 或者我应该?)?

What sort of simultaneous copy/move operations would not significantly affect each other, if performed simultaneously(I am not considering the load on the processor or the device controller ... or should I?)?

我承认我可能不太清楚这些问题,所以如果您需要更多详细信息以便能够提供答案,请告诉我。

I do admit I may not have been absolutely clear about the questions, so please let me know if you need more details to be able to provide an answer.

谢谢。

推荐答案

我认为你可以通过外部调用使用部分Win Api在 C#中完成这样的事情。或者可能已经有一个我不知道的接口(因为我对C#比较新,只用了2个月)。但就个人而言,如果我想要性能,我会使用Windows Api在 C / C ++ 中做这样的事情;如果我想要一些好的功能和跨平台兼容性,我会使用 Python 。尝试找到一些提供跨平台兼容性的库和一个基于标准win api函数的层。

I think you can accomplish such a thing in C# using part of the Win Api through external calls. Or maybe there is already an interface for this that I am not aware of (Since I am comparatively new to C# having used it for only 2 months). Personally , however , I would make such a thing in C/C++ using the Windows Api if I want performance, or Python if I want some good features and cross-platform compatibility. Try to find some library that provides cross-platform compatibility and a layer on top of the standard win api functions.

此链接可能会有所帮助:
< a href =http://msdn.microsoft.com/en-us/library/cc148994.aspx =nofollow> http://msdn.microsoft.com/en-us/library/cc148994.aspx

This link may come in helpful: http://msdn.microsoft.com/en-us/library/cc148994.aspx

此外,如果您不太担心跨平台兼容性有快捷方式,您可以尝试使用 OS特定的命令,如批量,如果你使用非常容易的窗口,
例如,如果你想将名为foo的文件从C:\复制到D:\只是做复制C:\ .Foo.txt D:\Foo.txt
你完成了,你不必担心USB驱动器或硬盘,只需要你需要的一切tp know是要复制到的目录。您可以使用C / C ++中的system()函数访问这些命令,我​​不知道C Sharp等效。

Also if you are not too worried about cross-platform compatibility there is a shortcut, you can try using OS specific commands like Batch if you use windows which are quite easy, e.g if you want to copy a file named foo from C:\ to D:\ just do "Copy C:\Foo.txt D:\Foo.txt" and you are done, you don't have to worry about USB Drives or Hard Disks, all you need tp know is the directory to copy to. You can access these commands using the "system()" function in C/C++, I don't know of a C Sharp equivelant.

这篇关于存储设备,文件传输和复制操作逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆