CH-J Tools Mobile透過 SSH 管理伺服器
選單
已發布的原始碼

CH-J Tools Mobile

瀏覽特定應用程式版本的目錄與檔案。

下載原始碼 ZIP
CH-J / CH-J Tools Mobile 175 個檔案
sm-mobile-20261016T185235Z-8e93ecc1b59a 新增時間: · 建置時間:
local_files.dart 新增時間: 未記錄日期 872 B · 32 行
程式碼 下載檔案
1import 'dart:typed_data';
2import 'dart:io';
3import 'package:path_provider/path_provider.dart';
4import '../core/failure.dart';
6Future<Uint8List> readBounded(Stream<List<int>> stream, int limit) async {
7 final bytes = BytesBuilder(copy: false);
8 await for (final chunk in stream) {
9 if (bytes.length + chunk.length > limit) {
10 throw const Failure('invalidImport');
11 }
12 bytes.add(chunk);
13 }
14 return bytes.takeBytes();
17Future<void> purgeTransferCache() async {
18 final root = await getTemporaryDirectory();
19 await for (final entry in root.list(followLinks: false)) {
20 if (entry is Directory &&
21 entry.path
22 .split(Platform.pathSeparator)
23 .last
24 .startsWith('sm-transfer-')) {
25 try {
26 await entry.delete(recursive: true);
27 } catch (_) {
28 /* Retry at next launch. */
29 }
30 }
31 }
SHA-256032fcb7ef1f7a21014510cc696a9831bd9ea4a2bafb016c97a79149d7e7486ce

CH-J Proprietary Software License 1.14 · 原始碼依 CH-J Proprietary Software License 1.14 提供。公開原始碼不會改變授權條款,也不會授予額外的權利。

壓縮檔 SHA-25646e427a43e87af091004f36145590bda8fe90086dfb0f631afeb5029fb0b5655
檔案