tidevice 文件操作命令

1、拉取沙盒目录文件

  def pull(self, file_src, file_dir, package_name=None,udid=None):
        cmd = "tidevice -u {} fsync -B {} pull '{}' '{}'".format(udid, package_name, file_src, file_dir)
        subprocess.call(cmd, shell=True)

比如:

tidevice -u 0000000000-000000000 fsync -B com.test.test pull /Documents/log /Users/test

2、推资源到沙盒目录

    def push(self, file_src, file_dir, package_name=None,udid=None):
        cmd = "tidevice -u {} fsync -B {} push '{}' '{}'".format(udid, package_name, file_src, file_dir)
        subprocess.call(cmd, shell=True)

3、删除沙盒目录文件

    def delete_file(self, file_dir, package_name=None,udid=None):
        cmd = "tidevice -u {} fsync -B {} rmtree {} 2>&1".format(udid, package_name, file_dir)
        subpro

你可能感兴趣的:(tidevice 文件操作命令)