判断文件文件夹是否存在

'''
    判断文件是否存在,存在无效果,不存在则生成文件夹
    path:路径的绝对路径,通过获取当前文件的绝对路径,再将文件夹文件拼接起来
'''
def isexists_dir_Create(self,path):
     if not os.path.exists(path):
        os.makedirs(path)

 

相关文章:

  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
  • 2022-01-22
  • 2021-10-29
  • 2021-06-11
相关资源
相似解决方案