Open xhdong-umd opened 7 years ago
From the source code, looks like it is checking from file extension only sometimes. The function name and the help made me to expect the file at least need to be exist, or it should always check by content.
Thanks for this. I've now clarified in the help that the file does indeed not need to exist (when `method = "extension"; the default).
I could look into the possibility of returning isFile(x) || ...
. However, that's major work, because it will require lots of rev dep checks. It could be that some code somewhere is relying on isGzipped()
to test the filename extension regardless of the file existing or not.
Running examples in
compressFile
:Note the
foo.txt.gz
is not exist yet butisGzipped
returnedTRUE
. Further test prove that it will returnTRUE
for any file name withgz
even it doesn't exist.isGzipped("test.gz")