def belongs_to_folder(path, fileName):
 if (not path.endswith(os.path.sep)):
  path += os.path.sep
 return fileName.startswith(path)

def belongs_to_folder ( path , fileName ) : if ( not path . endswith ( os . path . sep ) ) : path += os . path . sep return fileName . startswith ( path )
determine if filename is located under path structure .