getExtension.File: Takes a filename and returns the extension

Description Usage Arguments Value Author(s) See Also

Description

Takes a filename and returns the extension. This method can either be called i) as a method of a File object or ii) as static method. If it is called as a static method the filename is specified by the argument filename.

Moreover, if the filename is foo.tar.gz and if argument last=2, the method returns c("tar", "gz").

Usage

1
File$getExtension(filename, last=1, ...)

Arguments

filename

If called as a static method, this argument specifies the filename.

last

vector of integers specifying how many extensions that should be returned counting from the end of the filename.

Value

Returns a character string.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

For more information see File.


HenrikBengtsson/R.io documentation built on May 6, 2019, 11:54 p.m.