file-copying

Copied file sharing same mutual history in Mercurial (TortoiseHG)

我与影子孤独终老i 提交于 2021-01-29 04:09:56
问题 In Mercurial (preferably via TortoiseHG interface) is it possible to copy a committed file, and for the new destination file to share the history for the source file? I'm pretty sure this is not possible, but I'm asking in the hope that it's just really well hidden in the documentation. I have a file with a fairly long history of changes, but I now need to have have a 2nd copy of this file within the project which will contain it's own individual changes. However, it would be exceedingly

Difference of FICLONE vs FICLONERANGE vs copy_file_range (for copy-on-write support)

拜拜、爱过 提交于 2021-01-01 08:15:20
问题 I wonder about an efficient way to copy files (on Linux, on a FS which supports copy-on-write (COW)). Specifically, I want that my implementation uses copy-on-write if possible, but otherwise falls back to other efficient variants. Specifically, I also care about server-side copy (supported by SMB, NFS and others), and also zero-copy (i.e. bypassing the CPU or memory if possible). (This question is not really specific to any programming language. It could be C or C++, but also any other like

Difference of FICLONE vs FICLONERANGE vs copy_file_range (for copy-on-write support)

纵饮孤独 提交于 2021-01-01 08:14:55
问题 I wonder about an efficient way to copy files (on Linux, on a FS which supports copy-on-write (COW)). Specifically, I want that my implementation uses copy-on-write if possible, but otherwise falls back to other efficient variants. Specifically, I also care about server-side copy (supported by SMB, NFS and others), and also zero-copy (i.e. bypassing the CPU or memory if possible). (This question is not really specific to any programming language. It could be C or C++, but also any other like

Difference of FICLONE vs FICLONERANGE vs copy_file_range (for copy-on-write support)

拟墨画扇 提交于 2021-01-01 08:14:00
问题 I wonder about an efficient way to copy files (on Linux, on a FS which supports copy-on-write (COW)). Specifically, I want that my implementation uses copy-on-write if possible, but otherwise falls back to other efficient variants. Specifically, I also care about server-side copy (supported by SMB, NFS and others), and also zero-copy (i.e. bypassing the CPU or memory if possible). (This question is not really specific to any programming language. It could be C or C++, but also any other like

PowerShell: Copy-Item fails despite the same process working with Windows Explorer

牧云@^-^@ 提交于 2020-06-12 04:15:45
问题 I have a script that needs to copy files on a regular basis (every hour). I can open the source and destination folder using windows explorer and copy the file without issue. However, if I try the same thing in PowerShell I get an Access to the path is denied error. I've checked the permissions on the share and I have full access. Why does this fail through PowerShell? Copy-Item command: Copy-Item \\idmststtrm2\tns_admin$\tnsnames.ora -Destination \\bts13r2b\tnsnames -Force Errors: Copy-Item

Checking when shutil.copyfile is done

巧了我就是萌 提交于 2020-04-10 08:09:53
问题 I have a such code: for file in file_list: shutil.copyfile(file,newpath) #do further actions And here is the question, at #do further actions I use the copied f iles thus I need to make sure the shutil.copyfile functions finish their task. How can I make sure of this ? 回答1: The shutil functions should return only after the operation is finished. If nothing funny is going on on the OS level it should be safe this way. If you know the size of the file you could check if that is correct. 回答2:

Checking when shutil.copyfile is done

耗尽温柔 提交于 2020-04-10 08:05:06
问题 I have a such code: for file in file_list: shutil.copyfile(file,newpath) #do further actions And here is the question, at #do further actions I use the copied f iles thus I need to make sure the shutil.copyfile functions finish their task. How can I make sure of this ? 回答1: The shutil functions should return only after the operation is finished. If nothing funny is going on on the OS level it should be safe this way. If you know the size of the file you could check if that is correct. 回答2:

make an MSBuild Copy Task only copy if the source is newer regardless of size

醉酒当歌 提交于 2020-04-08 04:57:55
问题 I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this: <Target Name="DeployToPublicDocuments" Inputs="@(DeploymentItems)" Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"> <Copy SourceFiles="%(DeploymentItems.FullPath)" DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)

make an MSBuild Copy Task only copy if the source is newer regardless of size

有些话、适合烂在心里 提交于 2020-04-08 04:56:24
问题 I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this: <Target Name="DeployToPublicDocuments" Inputs="@(DeploymentItems)" Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"> <Copy SourceFiles="%(DeploymentItems.FullPath)" DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)

Checking when shutil.copyfile is done

落爺英雄遲暮 提交于 2020-04-07 10:36:01
问题 I have a such code: for file in file_list: shutil.copyfile(file,newpath) #do further actions And here is the question, at #do further actions I use the copied f iles thus I need to make sure the shutil.copyfile functions finish their task. How can I make sure of this ? 回答1: The shutil functions should return only after the operation is finished. If nothing funny is going on on the OS level it should be safe this way. If you know the size of the file you could check if that is correct. 回答2: