Function |file_stem

fs/path::|file_stem


Usage

|file_stem(path)

Parameters

↳ path: string

Return

↴ Option<string>


Gives file stem.

Return the part of the name before last ., or full name if starting with . with none in, or not containing any . at all.

The stem is:

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