/* Takes Path as input, returns the next name component in Name, and returns the position after Name (e.g., the start of the next name component) */
CHAR16* FatGetNextNameComponent(IN CHAR16 *Path, OUT CHAR16 *Name)
/* Takes Path as input, returns the next name component in Name, and returns the position after Name (e.g., the start of the next name component) */
CHAR16* FatGetNextNameComponent(IN CHAR16 *Path, OUT CHAR16 *Name)
{
  while (*Path != 0 && *Path != PATH_NAME_SEPARATOR) {
    *Name++ = *Path++;
  }
  *Name = 0;
  while (*Path == PATH_NAME_SEPARATOR) {
    Path++;
  }
  return Path;
}