Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道这是否可以将文件从一台机器复制到另一台机器,而无需File.Copy(...)在第三台机器上运行的程序中使用 .NET 制作本地副本?
File.Copy(...)
将文件加载到内存中,然后将其保存到另一台机器上。
var buffer = File.ReadAllBytes(filePath); using (var sw = new BinaryWriter(new FileStream(newFilePath)) sw.Write(buffer);