思路,判断文件大小是否有改变 (绝大多数情况可以)
def is_completed(self, file_path): file_size = -1 while file_size != os.path.getsize(file_path): file_size = os.path.getsize(file_path) time.sleep(1) todo(file_path)
标签:文件,python,getsize,传输,file,path,os,size From: https://www.cnblogs.com/lshan/p/17306332.html