-
Notifications
You must be signed in to change notification settings - Fork 76
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
Idea for a text/binary sniffing function. Want it? #236
Comments
Is this OS specific? |
I don't think so but I'll write some tests and see what the CI servers say. |
Pushed my feature branch, with tests. If Travis and Appveyor run successfully, I will make a one-commit version of that branch and submit a PR. |
…orm matter, completing ticket gesistsa#236. This can be useful when a file extension is missing or ambiguous
This function is not OS specific. It works identically on Windows: as well as Linux and MacOS: I have not been able to formally demonstrate this until now because CI scripts were broken by the R version update. Now that problem seems to have been fixed upstream. The test failures in #239 are out of date and will clear if https://travis-ci.org/leeper/rio/builds/608907693 and https://ci.appveyor.com/project/leeper/rio/builds/28698005 are resubmitted to their respective CI services (in the case of former, after switching to the default xcode in |
* isfiletext() checks whether a file is text or binary in a cross platform matter, completing ticket #236. This can be useful when a file extension is missing or ambiguous * Minor tweak-- removed redundant 'fwf' entry from 'txtformats' in the test for isfiletext() * Incorporating feedback from #239#pullrequestreview-335144814 and merging in changes to master * Incorporating review feedback
Please specify whether your issue is about:
I got fed up the fact that my OS seems to always know which files are plain-text and yet my own code never does, so I did some googling and found this: https://stackoverflow.com/questions/32184809/python-file1-why-are-the-numbers-7-8-9-10-12-13-27-and-range0x20-0x100
That led to the function below. I'd rather contribute it to an existing package than try to tackle CRAN maintenance on my own, so if the below seems useful to include among rio's utilities I'll submit it as a PR.
Put your code here:
The text was updated successfully, but these errors were encountered: