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

Create Linux implementation #10

Closed
erikmav opened this issue Sep 15, 2022 · 7 comments
Closed

Create Linux implementation #10

erikmav opened this issue Sep 15, 2022 · 7 comments

Comments

@erikmav
Copy link
Contributor

erikmav commented Sep 15, 2022

Linux version is TODOs and NotImplementedExceptions

@danmoseley
Copy link
Member

If it's possible to do, we should do it in File.Copy itself. dotnet/runtime#79243 (comment)

@erikmav
Copy link
Contributor Author

erikmav commented May 24, 2023

Sure, see the Microsoft.Build.CopyOnWrite SDK which copies the Copy task code and adds in this library. Extend this library to all OSes and make use of it in Copy task in MSBuild.

@codingdave
Copy link

I was very happy to find this library and after reading the Readme I was sure it will work but then I run into this exception on Linux.

Exception has occurred: CLR/System.NotImplementedException
Exception thrown: 'System.NotImplementedException' in CopyOnWrite.dll: 'The method or operation is not implemented.'

at Microsoft.CopyOnWrite.Linux.LinuxCopyOnWriteFilesystem.CopyOnWriteLinkSupportedInDirectoryTree(String rootDirectory, Boolean pathIsFullyResolved)

If the library does not have Linux support yet, it should be documented up-front.

@danmoseley adding the COW feature to File.Copy was even better as this was the first place I was checking for COW support.

@erikmav
Copy link
Contributor Author

erikmav commented May 24, 2023

Added a note in README about the missing support.

@rainersigwald
Copy link
Member

On Linux, you should just pass through to the BCL implementation of File.Copy(). It is copy-on-write enlightened since .NET 7: dotnet/runtime#64264.

@codingdave
Copy link

That are awesome news and a reason to change .NET 6 to 7 on my Synology box. Thanks for the information!

@erikmav
Copy link
Contributor Author

erikmav commented Jan 12, 2024

Closing issue as unneeded. README.md updated with info about possible Windows future plus Mac and Linux.

@erikmav erikmav closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants