def validate_pathname(filepath):
if filepath == '<STR_LIT:/>':<EOL><INDENT>return ValidatePathState.OK<EOL><DEDENT>if len(filepath) > <NUM_LIT:1000>:<EOL><INDENT>return ValidatePathState.LENGTH_ERROR<EOL><DEDENT>filter2 = '<STR_LIT>'<EOL>for c in filter2:<EOL><INDENT>if c in filepath:<EOL><INDENT>return ValidatePathState.CHAR_ERROR2<EOL><DEDENT><DEDENT>paths = rec_split_path(filepath)<EOL>filter3 = '<STR_LIT>'<EOL>for path in paths:<EOL><INDENT>if path[<NUM_LIT:0>] in filter3 or path[-<NUM_LIT:1>] in filter3:<EOL><INDENT>return ValidatePathState.CHAR_ERROR3<EOL><DEDENT><DEDENT>return ValidatePathState.OK<EOL>
检查路径中是否包含特殊字符.

    百度网盘对路径/文件名的要求很严格:
      1. 路径长度限制为1000
      2. 路径中不能包含以下字符：\\ ? | " > < : *
      3. 文件名或路径名开头结尾不能是“.”或空白字符，空白字符包括: \r, \n, \t, 空格, \0, \x0B

    @return, 返回的状态码: 0 表示正常