25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

11 lines
293 B

  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)