def split_api_filepath(path):
parts = path.rsplit('<STR_LIT:/>', <NUM_LIT:1>)<EOL>if len(parts) == <NUM_LIT:1>:<EOL><INDENT>name = parts[<NUM_LIT:0>]<EOL>dirname = '<STR_LIT:/>'<EOL><DEDENT>else:<EOL><INDENT>name = parts[<NUM_LIT:1>]<EOL>dirname = parts[<NUM_LIT:0>] + '<STR_LIT:/>'<EOL><DEDENT>return from_api_dirname(dirname), name<EOL>
Split an API file path into directory and name.