Loading apps/demo/src/pages/file-manager.tsx +2 −1 Original line number Diff line number Diff line Loading @@ -710,7 +710,8 @@ class FileManagerState { }) ) ), mode: (LinuxFileType.File << 12) | 0o666, type: LinuxFileType.File, permission: 0o666, mtime: file.lastModified / 1000, }); Loading libraries/adb/src/commands/sync/push.ts +8 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ export interface AdbSyncPushV1Options { socket: AdbSyncSocket; filename: string; file: ReadableStream<Consumable<Uint8Array>>; mode?: number; type: LinuxFileType; permission: number; mtime?: number; packetSize?: number; } Loading Loading @@ -71,12 +72,14 @@ export async function adbSyncPushV1({ socket, filename, file, mode = (LinuxFileType.File << 12) | 0o666, type = LinuxFileType.File, permission = 0o666, mtime = (Date.now() / 1000) | 0, packetSize = ADB_SYNC_MAX_PACKET_SIZE, }: AdbSyncPushV1Options) { const locked = await socket.lock(); try { const mode = (type << 12) | permission; const pathAndMode = `${filename},${mode.toString()}`; await adbSyncWriteRequest(locked, AdbSyncRequestId.Send, pathAndMode); await pipeFile(locked, file, packetSize, mtime); Loading Loading @@ -115,7 +118,8 @@ export async function adbSyncPushV2({ socket, filename, file, mode = (LinuxFileType.File << 12) | 0o666, type = LinuxFileType.File, permission = 0o666, mtime = (Date.now() / 1000) | 0, packetSize = ADB_SYNC_MAX_PACKET_SIZE, dryRun = false, Loading @@ -124,6 +128,7 @@ export async function adbSyncPushV2({ try { await adbSyncWriteRequest(locked, AdbSyncRequestId.SendV2, filename); const mode = (type << 12) | permission; let flags: AdbSyncSendV2Flags = AdbSyncSendV2Flags.None; if (dryRun) { flags |= AdbSyncSendV2Flags.DryRun; Loading libraries/adb/src/commands/sync/sync.ts +3 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import { adbSyncOpenDir } from "./list.js"; import { adbSyncPull } from "./pull.js"; import { adbSyncPush } from "./push.js"; import { AdbSyncSocket } from "./socket.js"; import type { LinuxFileType } from "./stat.js"; import { adbSyncLstat, adbSyncStat } from "./stat.js"; /** Loading @@ -32,7 +33,8 @@ export function dirname(path: string): string { export interface AdbSyncWriteOptions { filename: string; file: ReadableStream<Consumable<Uint8Array>>; mode?: number; type: LinuxFileType; permission: number; mtime?: number; dryRun?: boolean; } Loading Loading
apps/demo/src/pages/file-manager.tsx +2 −1 Original line number Diff line number Diff line Loading @@ -710,7 +710,8 @@ class FileManagerState { }) ) ), mode: (LinuxFileType.File << 12) | 0o666, type: LinuxFileType.File, permission: 0o666, mtime: file.lastModified / 1000, }); Loading
libraries/adb/src/commands/sync/push.ts +8 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ export interface AdbSyncPushV1Options { socket: AdbSyncSocket; filename: string; file: ReadableStream<Consumable<Uint8Array>>; mode?: number; type: LinuxFileType; permission: number; mtime?: number; packetSize?: number; } Loading Loading @@ -71,12 +72,14 @@ export async function adbSyncPushV1({ socket, filename, file, mode = (LinuxFileType.File << 12) | 0o666, type = LinuxFileType.File, permission = 0o666, mtime = (Date.now() / 1000) | 0, packetSize = ADB_SYNC_MAX_PACKET_SIZE, }: AdbSyncPushV1Options) { const locked = await socket.lock(); try { const mode = (type << 12) | permission; const pathAndMode = `${filename},${mode.toString()}`; await adbSyncWriteRequest(locked, AdbSyncRequestId.Send, pathAndMode); await pipeFile(locked, file, packetSize, mtime); Loading Loading @@ -115,7 +118,8 @@ export async function adbSyncPushV2({ socket, filename, file, mode = (LinuxFileType.File << 12) | 0o666, type = LinuxFileType.File, permission = 0o666, mtime = (Date.now() / 1000) | 0, packetSize = ADB_SYNC_MAX_PACKET_SIZE, dryRun = false, Loading @@ -124,6 +128,7 @@ export async function adbSyncPushV2({ try { await adbSyncWriteRequest(locked, AdbSyncRequestId.SendV2, filename); const mode = (type << 12) | permission; let flags: AdbSyncSendV2Flags = AdbSyncSendV2Flags.None; if (dryRun) { flags |= AdbSyncSendV2Flags.DryRun; Loading
libraries/adb/src/commands/sync/sync.ts +3 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import { adbSyncOpenDir } from "./list.js"; import { adbSyncPull } from "./pull.js"; import { adbSyncPush } from "./push.js"; import { AdbSyncSocket } from "./socket.js"; import type { LinuxFileType } from "./stat.js"; import { adbSyncLstat, adbSyncStat } from "./stat.js"; /** Loading @@ -32,7 +33,8 @@ export function dirname(path: string): string { export interface AdbSyncWriteOptions { filename: string; file: ReadableStream<Consumable<Uint8Array>>; mode?: number; type: LinuxFileType; permission: number; mtime?: number; dryRun?: boolean; } Loading