Function |extension

fs/path::|extension


Usage

|extension(path)

Parameters

↳ path: string

Return

↴ Option<string>


Gives file path extension.

Return the part of the name after last ., or none if there is no extension.

The extension is:

  • none, if there is no file name
  • none, if there is no embedded .
  • none, if the file name begins with . and has no other .s within
  • otherwise, the portion of the file name after the final .