react-native-kookit 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/TTS_CHECKLIST.md +256 -0
- package/android/src/main/java/expo/modules/kookit/ReactNativeKookitModule.kt +284 -0
- package/build/ReactNativeKookit.types.d.ts +11 -0
- package/build/ReactNativeKookit.types.d.ts.map +1 -1
- package/build/ReactNativeKookit.types.js.map +1 -1
- package/build/ReactNativeKookitModule.d.ts +37 -1
- package/build/ReactNativeKookitModule.d.ts.map +1 -1
- package/build/ReactNativeKookitModule.js.map +1 -1
- package/ios/ReactNativeKookitModule.swift +143 -0
- package/package.json +1 -1
- package/ANDROID_BUILD_FIX.md +0 -117
- package/ANDROID_FTP_UPDATE.md +0 -161
- package/ANDROID_SETUP.md +0 -188
- package/ANDROID_SMB_LIBRARY_COMPARISON.md +0 -170
- package/ANDROID_SMB_LISTSHARES_FIX.md +0 -100
- package/API_UNIFICATION.md +0 -180
- package/EXPO_PLUGIN_README.md +0 -136
- package/FTP_CLIENT_API.md +0 -301
- package/FTP_FILE_LIST_ENHANCEMENT.md +0 -186
- package/FTP_FILE_OPERATIONS.md +0 -0
- package/FTP_README.md +0 -322
- package/README_NEW.md +0 -143
- package/RELEASE_CHECKLIST.md +0 -115
- package/SMB_CLIENT_STATIC_METHODS.md +0 -175
- package/SMB_COMPLETE_GUIDE.md +0 -308
- package/SMB_HYBRID_IMPLEMENTATION.md +0 -160
- package/SMB_IMPLEMENTATION_SUMMARY.md +0 -229
- package/SMB_USAGE.md +0 -275
- package/TROUBLESHOOTING.md +0 -132
- /package/{ANDROID_PARAMETER_FIX.md → CHANGELOG_CONTENT_URI.md} +0 -0
- /package/{FTP_EXAMPLE_IMPLEMENTATION.md → IMPLEMENTATION_SUMMARY.md} +0 -0
package/FTP_CLIENT_API.md
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
# FTP Client API
|
|
2
|
-
|
|
3
|
-
This document describes the new FTP Client API that provides an object-oriented approach to FTP operations.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
The new FTP API allows you to create multiple FTP client instances, each maintaining its own connection and state. This is more flexible than the previous global FTP functions.
|
|
8
|
-
|
|
9
|
-
## Basic Usage
|
|
10
|
-
|
|
11
|
-
### Creating an FTP Client
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { FtpClient } from "react-native-kookit";
|
|
15
|
-
|
|
16
|
-
// Method 1: Using static create method (recommended)
|
|
17
|
-
const ftpClient = await FtpClient.create("my-client-id");
|
|
18
|
-
|
|
19
|
-
// Method 2: Manual initialization
|
|
20
|
-
const ftpClient = new FtpClient("my-client-id");
|
|
21
|
-
await ftpClient.initialize();
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Setting up Event Handlers
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
ftpClient.setEventHandlers({
|
|
28
|
-
onProgress: (progress) => {
|
|
29
|
-
console.log(`Progress: ${progress.percentage}%`);
|
|
30
|
-
console.log(`Transferred: ${progress.transferred}/${progress.total} bytes`);
|
|
31
|
-
},
|
|
32
|
-
onComplete: () => {
|
|
33
|
-
console.log("Operation completed successfully!");
|
|
34
|
-
},
|
|
35
|
-
onError: (error) => {
|
|
36
|
-
console.error("FTP Error:", error.message);
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Connecting to FTP Server
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
await ftpClient.connect({
|
|
45
|
-
host: "192.168.1.100",
|
|
46
|
-
port: 21, // optional, defaults to 21
|
|
47
|
-
username: "your-username",
|
|
48
|
-
password: "your-password",
|
|
49
|
-
passive: true, // optional, defaults to true
|
|
50
|
-
timeout: 30, // optional, defaults to 30 seconds
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## FTP Operations
|
|
55
|
-
|
|
56
|
-
### Directory Operations
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
// Get current directory
|
|
60
|
-
const currentDir = await ftpClient.getCurrentDirectory();
|
|
61
|
-
console.log("Current directory:", currentDir);
|
|
62
|
-
|
|
63
|
-
// Change directory
|
|
64
|
-
await ftpClient.changeDirectory("/path/to/directory");
|
|
65
|
-
|
|
66
|
-
// Create directory
|
|
67
|
-
await ftpClient.createDirectory("/path/to/new-directory");
|
|
68
|
-
|
|
69
|
-
// List files and directories
|
|
70
|
-
const files = await ftpClient.list(); // List current directory
|
|
71
|
-
const filesInPath = await ftpClient.list("/specific/path"); // List specific path
|
|
72
|
-
|
|
73
|
-
files.forEach((file) => {
|
|
74
|
-
console.log(
|
|
75
|
-
`${file.name} - ${file.isDirectory ? "DIR" : "FILE"} - ${file.size} bytes`
|
|
76
|
-
);
|
|
77
|
-
});
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### File Operations
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
// Download file
|
|
84
|
-
await ftpClient.download("/remote/path/file.txt", "/local/path/file.txt");
|
|
85
|
-
|
|
86
|
-
// Upload file
|
|
87
|
-
await ftpClient.upload("/local/path/file.txt", "/remote/path/file.txt");
|
|
88
|
-
|
|
89
|
-
// Delete file
|
|
90
|
-
await ftpClient.delete("/remote/path/file.txt");
|
|
91
|
-
|
|
92
|
-
// Delete directory
|
|
93
|
-
await ftpClient.delete("/remote/path/directory", true); // true for directory
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Client Management
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
// Check client status
|
|
100
|
-
const status = ftpClient.getStatus();
|
|
101
|
-
console.log("Client exists:", status.exists);
|
|
102
|
-
console.log("Client connected:", status.connected);
|
|
103
|
-
|
|
104
|
-
// Check if connected (convenience method)
|
|
105
|
-
if (ftpClient.isConnected()) {
|
|
106
|
-
console.log("Client is ready for operations");
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Get client ID
|
|
110
|
-
const clientId = ftpClient.getClientId();
|
|
111
|
-
console.log("Client ID:", clientId);
|
|
112
|
-
|
|
113
|
-
// Disconnect from server
|
|
114
|
-
await ftpClient.disconnect();
|
|
115
|
-
|
|
116
|
-
// Dispose client and clean up resources
|
|
117
|
-
await ftpClient.dispose();
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Advanced Usage
|
|
121
|
-
|
|
122
|
-
### Multiple FTP Clients
|
|
123
|
-
|
|
124
|
-
```typescript
|
|
125
|
-
import { FtpClient } from "react-native-kookit";
|
|
126
|
-
|
|
127
|
-
// Create multiple clients for different servers
|
|
128
|
-
const client1 = await FtpClient.create("server1");
|
|
129
|
-
const client2 = await FtpClient.create("server2");
|
|
130
|
-
|
|
131
|
-
// Connect to different servers
|
|
132
|
-
await client1.connect({
|
|
133
|
-
host: "ftp1.example.com",
|
|
134
|
-
username: "user1",
|
|
135
|
-
password: "pass1",
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
await client2.connect({
|
|
139
|
-
host: "ftp2.example.com",
|
|
140
|
-
username: "user2",
|
|
141
|
-
password: "pass2",
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// Perform operations on different servers simultaneously
|
|
145
|
-
const [files1, files2] = await Promise.all([client1.list(), client2.list()]);
|
|
146
|
-
|
|
147
|
-
// Clean up
|
|
148
|
-
await Promise.all([client1.dispose(), client2.dispose()]);
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Managing All Clients
|
|
152
|
-
|
|
153
|
-
```typescript
|
|
154
|
-
// List all active FTP clients
|
|
155
|
-
const clientsInfo = FtpClient.listClients();
|
|
156
|
-
console.log("Active clients:", clientsInfo.count);
|
|
157
|
-
console.log("Clients details:", clientsInfo.clients);
|
|
158
|
-
|
|
159
|
-
// Example output:
|
|
160
|
-
// {
|
|
161
|
-
// clients: {
|
|
162
|
-
// 'client-1': { connected: true },
|
|
163
|
-
// 'client-2': { connected: false }
|
|
164
|
-
// },
|
|
165
|
-
// count: 2
|
|
166
|
-
// }
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Error Handling
|
|
170
|
-
|
|
171
|
-
```typescript
|
|
172
|
-
try {
|
|
173
|
-
const ftpClient = await FtpClient.create();
|
|
174
|
-
|
|
175
|
-
await ftpClient.connect({
|
|
176
|
-
host: "ftp.example.com",
|
|
177
|
-
username: "user",
|
|
178
|
-
password: "pass",
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
await ftpClient.download("/remote/file.txt", "/local/file.txt");
|
|
182
|
-
} catch (error) {
|
|
183
|
-
console.error("FTP operation failed:", error.message);
|
|
184
|
-
} finally {
|
|
185
|
-
// Always dispose to clean up resources
|
|
186
|
-
if (ftpClient) {
|
|
187
|
-
await ftpClient.dispose();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## API Reference
|
|
193
|
-
|
|
194
|
-
### FtpClient Class
|
|
195
|
-
|
|
196
|
-
#### Constructor
|
|
197
|
-
|
|
198
|
-
- `new FtpClient(clientId?: string)` - Create a new FTP client instance
|
|
199
|
-
|
|
200
|
-
#### Static Methods
|
|
201
|
-
|
|
202
|
-
- `FtpClient.create(clientId?: string): Promise<FtpClient>` - Create and initialize a new FTP client
|
|
203
|
-
- `FtpClient.listClients()` - Get information about all active FTP clients
|
|
204
|
-
|
|
205
|
-
#### Instance Methods
|
|
206
|
-
|
|
207
|
-
**Lifecycle:**
|
|
208
|
-
|
|
209
|
-
- `initialize(): Promise<void>` - Initialize the client (called automatically by `create()`)
|
|
210
|
-
- `dispose(): Promise<void>` - Dispose client and clean up resources
|
|
211
|
-
|
|
212
|
-
**Connection:**
|
|
213
|
-
|
|
214
|
-
- `connect(config: FtpConnectionConfig): Promise<void>` - Connect to FTP server
|
|
215
|
-
- `disconnect(): Promise<void>` - Disconnect from FTP server
|
|
216
|
-
- `isConnected(): boolean` - Check if client is connected
|
|
217
|
-
|
|
218
|
-
**Directory Operations:**
|
|
219
|
-
|
|
220
|
-
- `list(path?: string): Promise<FtpFileInfo[]>` - List files and directories
|
|
221
|
-
- `getCurrentDirectory(): Promise<string>` - Get current working directory
|
|
222
|
-
- `changeDirectory(path: string): Promise<void>` - Change working directory
|
|
223
|
-
- `createDirectory(path: string): Promise<void>` - Create a directory
|
|
224
|
-
|
|
225
|
-
**File Operations:**
|
|
226
|
-
|
|
227
|
-
- `download(remotePath: string, localPath: string): Promise<void>` - Download a file
|
|
228
|
-
- `upload(localPath: string, remotePath: string): Promise<void>` - Upload a file
|
|
229
|
-
- `delete(remotePath: string, isDirectory?: boolean): Promise<void>` - Delete a file or directory
|
|
230
|
-
|
|
231
|
-
**Utility:**
|
|
232
|
-
|
|
233
|
-
- `getStatus()` - Get client status information
|
|
234
|
-
- `getClientId(): string` - Get the client ID
|
|
235
|
-
- `setEventHandlers(handlers: FtpClientEventHandlers): void` - Set event handlers
|
|
236
|
-
|
|
237
|
-
### Types
|
|
238
|
-
|
|
239
|
-
```typescript
|
|
240
|
-
interface FtpConnectionConfig {
|
|
241
|
-
host: string;
|
|
242
|
-
port?: number;
|
|
243
|
-
username: string;
|
|
244
|
-
password: string;
|
|
245
|
-
passive?: boolean;
|
|
246
|
-
timeout?: number;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
interface FtpFileInfo {
|
|
250
|
-
name: string;
|
|
251
|
-
isDirectory: boolean;
|
|
252
|
-
size: number;
|
|
253
|
-
lastModified: string;
|
|
254
|
-
permissions?: string;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
interface FtpClientEventHandlers {
|
|
258
|
-
onProgress?: (progress: {
|
|
259
|
-
transferred: number;
|
|
260
|
-
total: number;
|
|
261
|
-
percentage: number;
|
|
262
|
-
}) => void;
|
|
263
|
-
onComplete?: () => void;
|
|
264
|
-
onError?: (error: Error) => void;
|
|
265
|
-
}
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
## Migration from Old API
|
|
269
|
-
|
|
270
|
-
If you're migrating from the old global FTP functions, here's how to update your code:
|
|
271
|
-
|
|
272
|
-
### Old API:
|
|
273
|
-
|
|
274
|
-
```typescript
|
|
275
|
-
import ReactNativeKookitModule from "react-native-kookit";
|
|
276
|
-
|
|
277
|
-
await ReactNativeKookitModule.ftpConnect(config);
|
|
278
|
-
const files = await ReactNativeKookitModule.ftpList();
|
|
279
|
-
await ReactNativeKookitModule.ftpDownload(remotePath, localPath);
|
|
280
|
-
await ReactNativeKookitModule.ftpDisconnect();
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### New API:
|
|
284
|
-
|
|
285
|
-
```typescript
|
|
286
|
-
import { FtpClient } from "react-native-kookit";
|
|
287
|
-
|
|
288
|
-
const ftpClient = await FtpClient.create();
|
|
289
|
-
await ftpClient.connect(config);
|
|
290
|
-
const files = await ftpClient.list();
|
|
291
|
-
await ftpClient.download(remotePath, localPath);
|
|
292
|
-
await ftpClient.dispose(); // This disconnects and cleans up
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## Best Practices
|
|
296
|
-
|
|
297
|
-
1. **Always dispose clients**: Call `dispose()` when you're done to clean up resources
|
|
298
|
-
2. **Use try-finally blocks**: Ensure disposal happens even if operations fail
|
|
299
|
-
3. **Handle events**: Set up progress, completion, and error handlers for better UX
|
|
300
|
-
4. **Use meaningful client IDs**: This helps with debugging and client management
|
|
301
|
-
5. **Check connection status**: Use `isConnected()` before performing operations
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
# FTP 文件列表功能增强
|
|
2
|
-
|
|
3
|
-
本文档描述了对 FTP 客户端示例应用中文件列表功能的增强。
|
|
4
|
-
|
|
5
|
-
## 新增功能
|
|
6
|
-
|
|
7
|
-
### 🗂️ 增强的文件列表显示
|
|
8
|
-
|
|
9
|
-
**文件信息显示:**
|
|
10
|
-
|
|
11
|
-
- 📁 文件夹图标 / 📄 文件图标
|
|
12
|
-
- 文件/文件夹名称
|
|
13
|
-
- 文件大小(字节)
|
|
14
|
-
- 最后修改时间
|
|
15
|
-
- 文件权限信息
|
|
16
|
-
|
|
17
|
-
**交互功能:**
|
|
18
|
-
|
|
19
|
-
- 点击文件夹:直接进入该文件夹
|
|
20
|
-
- 点击文件:显示文件操作菜单
|
|
21
|
-
- 点击菜单按钮(⋮):显示详细操作选项
|
|
22
|
-
|
|
23
|
-
### 📂 目录导航功能
|
|
24
|
-
|
|
25
|
-
**导航按钮:**
|
|
26
|
-
|
|
27
|
-
- **Refresh(刷新)**: 重新加载当前目录的文件列表
|
|
28
|
-
- **Up(向上)**: 返回父目录
|
|
29
|
-
- **Root(根目录)**: 直接跳转到根目录
|
|
30
|
-
- **New Folder(新建文件夹)**: 创建新文件夹
|
|
31
|
-
|
|
32
|
-
**当前路径显示:**
|
|
33
|
-
|
|
34
|
-
- 实时显示当前所在的目录路径
|
|
35
|
-
- 便于用户了解当前位置
|
|
36
|
-
|
|
37
|
-
### 📄 文件操作菜单
|
|
38
|
-
|
|
39
|
-
**对于文件:**
|
|
40
|
-
|
|
41
|
-
- **Download(下载)**: 下载文件到本地临时目录
|
|
42
|
-
- **Delete(删除)**: 删除远程服务器上的文件
|
|
43
|
-
- **Cancel(取消)**: 关闭操作菜单
|
|
44
|
-
|
|
45
|
-
**对于文件夹:**
|
|
46
|
-
|
|
47
|
-
- **Open Directory(打开目录)**: 进入该文件夹
|
|
48
|
-
- **Delete(删除)**: 删除整个文件夹及其内容
|
|
49
|
-
- **Cancel(取消)**: 关闭操作菜单
|
|
50
|
-
|
|
51
|
-
### 📁 新建文件夹功能
|
|
52
|
-
|
|
53
|
-
**操作流程:**
|
|
54
|
-
|
|
55
|
-
1. 点击 "New Folder" 按钮
|
|
56
|
-
2. 在弹出的对话框中输入文件夹名称
|
|
57
|
-
3. 点击 "Create" 创建文件夹
|
|
58
|
-
4. 自动刷新文件列表显示新创建的文件夹
|
|
59
|
-
|
|
60
|
-
### 🔒 安全确认
|
|
61
|
-
|
|
62
|
-
**删除确认:**
|
|
63
|
-
|
|
64
|
-
- 删除任何文件或文件夹前都会弹出确认对话框
|
|
65
|
-
- 防止误删除重要数据
|
|
66
|
-
- 显示将要删除的项目名称
|
|
67
|
-
|
|
68
|
-
## 用户界面改进
|
|
69
|
-
|
|
70
|
-
### 📱 响应式设计
|
|
71
|
-
|
|
72
|
-
**文件列表项:**
|
|
73
|
-
|
|
74
|
-
- 更大的点击区域,便于触摸操作
|
|
75
|
-
- 清晰的视觉层次,信息一目了然
|
|
76
|
-
- 文件夹和文件使用不同的颜色和样式区分
|
|
77
|
-
|
|
78
|
-
**模态对话框:**
|
|
79
|
-
|
|
80
|
-
- 半透明背景,专注于当前操作
|
|
81
|
-
- 居中显示,适合各种屏幕尺寸
|
|
82
|
-
- 清晰的按钮布局,操作直观
|
|
83
|
-
|
|
84
|
-
### 🎨 视觉优化
|
|
85
|
-
|
|
86
|
-
**图标系统:**
|
|
87
|
-
|
|
88
|
-
- 📁 文件夹图标:蓝色文本,便于识别
|
|
89
|
-
- 📄 文件图标:常规颜色
|
|
90
|
-
- ⋮ 菜单图标:灰色,表示更多操作
|
|
91
|
-
|
|
92
|
-
**信息层次:**
|
|
93
|
-
|
|
94
|
-
- 文件名:主要信息,字体较大
|
|
95
|
-
- 文件大小:次要信息,字体中等
|
|
96
|
-
- 修改时间:辅助信息,字体较小,灰色
|
|
97
|
-
|
|
98
|
-
## 操作流程示例
|
|
99
|
-
|
|
100
|
-
### 典型文件浏览流程
|
|
101
|
-
|
|
102
|
-
1. **连接 FTP 服务器**
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
创建客户端 → 输入连接信息 → 点击连接
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
2. **浏览文件**
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
查看文件列表 → 点击文件夹进入 → 查看文件详情
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
3. **文件操作**
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
选择文件 → 选择操作(下载/删除) → 确认操作
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
4. **目录管理**
|
|
121
|
-
```
|
|
122
|
-
新建文件夹 → 输入名称 → 创建 → 查看结果
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### 下载文件示例
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
// 用户点击文件 → 选择下载 → 自动执行下载
|
|
129
|
-
const downloadFile = async (file: any) => {
|
|
130
|
-
const localPath = `/tmp/${file.name}`;
|
|
131
|
-
await ftpClient.download(file.name, localPath);
|
|
132
|
-
// 显示成功消息和本地路径
|
|
133
|
-
};
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### 创建文件夹示例
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
// 用户输入文件夹名 → 点击创建 → 自动刷新列表
|
|
140
|
-
const createFolder = async () => {
|
|
141
|
-
await ftpClient.createDirectory(newFolderName);
|
|
142
|
-
await listFiles(); // 刷新文件列表
|
|
143
|
-
};
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## 错误处理
|
|
147
|
-
|
|
148
|
-
### 网络错误
|
|
149
|
-
|
|
150
|
-
- 连接超时:显示友好的错误消息
|
|
151
|
-
- 认证失败:提示检查用户名和密码
|
|
152
|
-
- 权限不足:显示权限相关的错误信息
|
|
153
|
-
|
|
154
|
-
### 文件操作错误
|
|
155
|
-
|
|
156
|
-
- 下载失败:显示具体的失败原因
|
|
157
|
-
- 删除失败:可能是权限问题或文件正在使用
|
|
158
|
-
- 创建文件夹失败:可能是名称冲突或权限不足
|
|
159
|
-
|
|
160
|
-
### 用户输入错误
|
|
161
|
-
|
|
162
|
-
- 空文件夹名:禁用创建按钮
|
|
163
|
-
- 无效字符:提示输入有效的文件夹名称
|
|
164
|
-
|
|
165
|
-
## 技术实现要点
|
|
166
|
-
|
|
167
|
-
### 状态管理
|
|
168
|
-
|
|
169
|
-
- `files`: 当前目录的文件列表
|
|
170
|
-
- `selectedFile`: 当前选中的文件
|
|
171
|
-
- `showFileModal`: 文件操作模态框显示状态
|
|
172
|
-
- `showCreateFolder`: 创建文件夹模态框显示状态
|
|
173
|
-
|
|
174
|
-
### 事件处理
|
|
175
|
-
|
|
176
|
-
- 文件点击:区分文件和文件夹的不同处理逻辑
|
|
177
|
-
- 模态框管理:正确的显示和隐藏逻辑
|
|
178
|
-
- 异步操作:proper async/await 处理和错误捕获
|
|
179
|
-
|
|
180
|
-
### 用户体验优化
|
|
181
|
-
|
|
182
|
-
- 操作反馈:每个操作都有相应的日志记录
|
|
183
|
-
- 进度显示:下载和上传操作显示进度
|
|
184
|
-
- 状态保持:操作完成后自动刷新相关状态
|
|
185
|
-
|
|
186
|
-
这些增强功能使得 FTP 客户端示例应用更加实用和用户友好,提供了完整的文件管理体验。
|
package/FTP_FILE_OPERATIONS.md
DELETED
|
File without changes
|