您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011
  1. import os
  2. import os.path
  3. def cs_path_exists(fspath):
  4. if not os.path.exists(fspath):
  5. return False
  6. # make absolute so we always have a directory
  7. abspath = os.path.abspath(fspath)
  8. directory, filename = os.path.split(abspath)
  9. return filename in os.listdir(directory)