In the released fs 1.0.0, extension includes the period. Python's os.path.splitext does too. My tests showed that using subs was a bit faster than the splitting the characters and rejoining them. I think it's easier to read as well. I added some tests, including one for the special case of a filename beginning with a "." -- the whole thing should be considered the name, with no extension.
In the released fs 1.0.0,
extension
includes the period. Python's os.path.splitext does too. My tests showed that using subs was a bit faster than the splitting the characters and rejoining them. I think it's easier to read as well. I added some tests, including one for the special case of a filename beginning with a "." -- the whole thing should be considered the name, with no extension.