(
filenames: string | readonly string[],
options?: { recursive?: boolean; force?: boolean },
)
| 132 | } |
| 133 | |
| 134 | rm( |
| 135 | filenames: string | readonly string[], |
| 136 | options?: { recursive?: boolean; force?: boolean }, |
| 137 | ): Promise<string> { |
| 138 | const args = ["rm"]; |
| 139 | if (options?.recursive) { |
| 140 | args.push("-r"); |
| 141 | } |
| 142 | if (options?.force) { |
| 143 | args.push("-f"); |
| 144 | } |
| 145 | if (Array.isArray(filenames)) { |
| 146 | for (const filename of filenames) { |
| 147 | // https://github.com/microsoft/typescript/issues/17002 |
| 148 | args.push(escapeArg(filename as string)); |
| 149 | } |
| 150 | } else { |
| 151 | // https://github.com/microsoft/typescript/issues/17002 |
| 152 | args.push(escapeArg(filenames as string)); |
| 153 | } |
| 154 | // https://android.googlesource.com/platform/packages/modules/adb/+/1a0fb8846d4e6b671c8aa7f137a8c21d7b248716/client/adb_install.cpp#984 |
| 155 | args.push("</dev/null"); |
| 156 | |
| 157 | return this.subprocess.noneProtocol.spawnWaitText(args); |
| 158 | } |
| 159 | |
| 160 | async sync(): Promise<AdbSync> { |
| 161 | const socket = await this.createSocket("sync:"); |
no test coverage detected