-
Notifications
You must be signed in to change notification settings - Fork 69
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
rebuild cp_file
in GDriveFileSystem
to use GoogleDriveFile.Copy
#222
rebuild cp_file
in GDriveFileSystem
to use GoogleDriveFile.Copy
#222
Conversation
- it uses `file.Copy` to copy files - `self._gdrive_create_dir` to copy folders the recursive implementation is in ffspec
@simone-viozzi hey, thanks. I'll try to find some time this week! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff, that's for starting this PR. I've put some comments to improve it and do a bit of research.
@shcheklein I noticed that there was no I also noticed that
then: print(fs.expand_path('root/tmp/fo1', recursive=True))
> ['root/tmp/fo1', 'root/tmp/fo1/file2.pdf', 'root/tmp/fo1/fo2/file3.pdf', 'root/tmp/fo1/fo2/fo3/file4.pdf']
# ( correct )
print(fs.expand_path('root/tmp/fo1/fo2/', recursive=True))
> ['root/tmp/fo1/fo2']
# ( wrong! Correct answer is: ['root/tmp/fo1/fo2', 'root/tmp/fo1/fo2/file3.pdf', 'root/tmp/fo1/fo2/fo3/file4.pdf'] )
Lines 469 to 509 in 27bbf4c
The same bug happens in find as well. I lost a good amount of time to understand why copy suddenly stopped working 😅 |
Can copy single files and folders, the recursive implementation is in
AbstractFileSystem.copy
.Is compatible with
AbstractFileSystem.copy
so for example:There are no tests for copy, but there is one for the
move
method, that right now is implemented ascopy + rm
, and the test passes.todo list:
@shcheklein can you please review the code? Also check if this is backward compatible with the previous implementation.
Thank you.