Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoveDirectory and CopyDirectory with overwrite #1493

Open
jnm2 opened this issue Feb 11, 2017 · 2 comments
Open

MoveDirectory and CopyDirectory with overwrite #1493

jnm2 opened this issue Feb 11, 2017 · 2 comments

Comments

@jnm2
Copy link
Contributor

jnm2 commented Feb 11, 2017

Please support overwriting with MoveDirectory and CopyDirectory.

A bool parameter in the third position would make sense, wouldn't it? This seems common enough and similar enough to other APIs:

MoveDirectory(fromPath, toPath, true);
CopyDirectory(fromPath, toPath, false);

Or should an entire options class be created in order to specify Overwrite?

@gsferreira
Copy link

@jnm2 could you explain why you have that need?

I'm saying that, because I had the same need but then I figured out that I wasn't Cleaning the output directory.

@jnm2
Copy link
Contributor Author

jnm2 commented Mar 1, 2017

@gsferreira I have tried that angle, but the need is intrinsic. I'm ILMerging into an assembly of the same name. I need to specify a temporary folder for the output so that the output doesn't overwrite the input .dll, .pdb and .xml, which causes ILMerge to crash. However as soon as ILMerge is finished, I need to copy whatever files are in the temporary directory into the original folder. The overwritten files may be any combination of .dll, .pdb, .xml, etc and I should not have to care which combination end up in the intermediate directory: any files present should simply replace the files in the original directory. Files in the original directory should not be deleted, besides the replacements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants