Split the pathname path into a pair (root, ext) such that root + ext == path, and ext is empty or begins with a period and contains at most one period. Leading periods on the basename are ignored.
getFileParts('file.txt')// ['file', '.txt']getFileParts('.cshrc')// ['.cshrc', ''] Copy
getFileParts('file.txt')// ['file', '.txt']getFileParts('.cshrc')// ['.cshrc', '']
Split the pathname path into a pair (root, ext) such that root + ext == path, and ext is empty or begins with a period and contains at most one period. Leading periods on the basename are ignored.