filePrefix method
Extracts the portion of the file name before the first "." -
None/null, if there is no file name; The entire file name if there is no embedded .; The portion of the file name before the first non-beginning .; The entire file name if the file name begins with . and has no other .s within; The portion of the file name before the second . if the file name begins with .
Implementation
String? filePrefix() => Env.isWindows
? WindowsPath(_string).filePrefix()
: UnixPath(_string).filePrefix();