cat(file="foo.txt", "Hello world!")
print(isGzipped("foo.txt"))
print(isGzipped("foo.txt.gz"))
gzip("foo.txt")
print(file.info("foo.txt.gz"))
print(isGzipped("foo.txt"))
print(isGzipped("foo.txt.gz"))
gunzip("foo.txt.gz")
print(file.info("foo.txt"))
file.remove("foo.txt")
Run the code above in your browser using DataLab