INNER CODE UNIT · Python
tail
ArcSurge/Termius-Pro-zh_CN · lang.py:45
tail = chunk[-(len(FUSE_SENTINEL) - 1):]
except OSError:
return False
def is_macos():
"""检测是否为 macOS 系统"""
return platform.system() == 'Darwin'
def is_windows():
"""检测是否为 Windows 系统"""
return platform.system() == 'Windows'
def _handle_remove_readonly(func, path, _):
"""shutil.rmtree 的错误处理回调:移除只读属性后重试"""
os.chmod(path, stat.S_IWRITE)