cboettig / minioclient

R Interface to the MINIO client
https://cboettig.github.io/minioclient/
Other
22 stars 3 forks source link

How to escape filenames with special characters #10

Open dbuijs opened 1 year ago

dbuijs commented 1 year ago

The command line mc utility will accept minio filenames with special characters in them as long as the whole path is contained within single quotes '

The R command mc_ls() will return filenames with spaces and special characters in them, but using these strings in mc_cat() returns an error.

As an example minio/test/12345 (1).pdf

Is there a syntax for escaping these special characters? Ideally anything that is returned by mc_ls() should be usable in mc_cat()

mskyttner commented 5 months ago

For spaces, try using a backslash?

Ie would for example mc_cat("\"minio/test/12345\ (1).pdf\"") work?

I wonder if automatically escaping such characters in any "incoming s3 pathspecs" strings maybe would be a good idea...