jeff-zucker / solid-content-manager

A syntax-highlighting editor and file manager for Solid data stores.
https://jeff-zucker.github.io/solid-content-manager/
MIT License
32 stars 14 forks source link

add copyFile and copyFolder #7

Closed bourgeoa closed 4 years ago

bourgeoa commented 5 years ago

the main point was to change the readFile function to the body.blob method in lieu of the body.txt one In the context of solid-ide it works for all files (text and non text including .pdf and image/audio/video. Could it be the default in solid-file-client. What do you think ?

May be not, but then readFile in copyFile should be replaced by a fetch(url) with blob method or to add an optional param in readFile with default to txt. The advantage of the last option is for education on the body methods. But this is so complex for me

jeff-zucker commented 5 years ago

Please take a look at https://github.com/jeff-zucker/solid-recursive-copy - this is what I intend to use as the basis for the copy methods in file-client and ide. I could use help testing it or, if you feel your patches would work better, let me know your thinking.

bourgeoa commented 5 years ago

My basis was your copyFolder from solid-file-client. I will check the diff with the solid-recursive-copy.

bourgeoa commented 5 years ago

Same as with solid-file-client when name appears more than once in fullname