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

Allow linking with copy/delete in storage service #4728

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

dantb
Copy link
Contributor

@dantb dantb commented Feb 9, 2024

Fixes #4716

@dantb dantb marked this pull request as ready for review February 9, 2024 11:56

private def doCopyAndDelete(absSourcePath: Path, absDestPath: Path, isDir: Boolean): IO[Unit] =
if (isDir)
IO.blocking(FileUtils.copyDirectory(absSourcePath.toFile, absDestPath.toFile)) >>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No lib we already have allows to copy directories ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I could see, java nio doesn't and fs2 basically just wraps that. This avoids having to implement by hand using e.g. using FileVisitor or akka streams. Docs here - https://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/FileUtils.html#copyDirectory-java.io.File-java.io.File-

@dantb dantb merged commit 9058232 into BlueBrain:master Feb 9, 2024
8 checks passed
@dantb dantb deleted the storage-app-link-with-copy-delete branch February 9, 2024 12:38
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

Successfully merging this pull request may close these issues.

Support linking via S3 mount in storage service
2 participants