com.beanbag.tiktokminigames 1.0.0
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/DefaultTemplate/backgroundlandscape.png +0 -0
- package/DefaultTemplate/backgroundlandscape.png.meta +159 -0
- package/DefaultTemplate/backgroundportrait.png +0 -0
- package/DefaultTemplate/backgroundportrait.png.meta +159 -0
- package/DefaultTemplate/game.js +151 -0
- package/DefaultTemplate/game.js.meta +7 -0
- package/DefaultTemplate/images/unity_logo.png +0 -0
- package/DefaultTemplate/images/unity_logo.png.meta +159 -0
- package/DefaultTemplate/images.meta +8 -0
- package/DefaultTemplate/plugin-config.js +23 -0
- package/DefaultTemplate/plugin-config.js.meta +7 -0
- package/DefaultTemplate/plugin.js +1 -0
- package/DefaultTemplate/plugin.js.meta +7 -0
- package/DefaultTemplate/unity-namespace.js +11 -0
- package/DefaultTemplate/unity-namespace.js.meta +7 -0
- package/DefaultTemplate/webgl-wasm-split.js +17 -0
- package/DefaultTemplate/webgl-wasm-split.js.meta +7 -0
- package/DefaultTemplate.meta +8 -0
- package/Editor/Extras/Integration/DouYinMiniGameSettings.cs +30 -0
- package/Editor/Extras/Integration/DouYinMiniGameSettings.cs.meta +11 -0
- package/Editor/Extras/Integration/DouYinMiniGameSettingsEditor.cs +354 -0
- package/Editor/Extras/Integration/DouYinMiniGameSettingsEditor.cs.meta +3 -0
- package/Editor/Extras/Integration/DouYinSubplatformInterface.cs +153 -0
- package/Editor/Extras/Integration/DouYinSubplatformInterface.cs.meta +3 -0
- package/Editor/Extras/Integration.meta +8 -0
- package/Editor/Extras/Providers/TTMiniGameSupportProvider.cs +148 -0
- package/Editor/Extras/Providers/TTMiniGameSupportProvider.cs.meta +3 -0
- package/Editor/Extras/Providers.meta +3 -0
- package/Editor/Extras/TTEditorSupportProviderRegister.cs +15 -0
- package/Editor/Extras/TTEditorSupportProviderRegister.cs.meta +3 -0
- package/Editor/Extras.meta +3 -0
- package/Editor/ttsdk_tools.dll +0 -0
- package/Editor/ttsdk_tools.dll.meta +33 -0
- package/Editor/ttsdk_tools.pdb +0 -0
- package/Editor/ttsdk_tools.pdb.meta +7 -0
- package/Editor.meta +8 -0
- package/LitJson/TTLitJson.dll +0 -0
- package/LitJson/TTLitJson.dll.meta +33 -0
- package/LitJson/TTLitJson.pdb +0 -0
- package/LitJson/TTLitJson.pdb.meta +7 -0
- package/LitJson.meta +8 -0
- package/TTSDK/ttsdk.dll +0 -0
- package/TTSDK/ttsdk.dll.meta +33 -0
- package/TTSDK/ttsdk.pdb +0 -0
- package/TTSDK/ttsdk.pdb.meta +7 -0
- package/TTSDK.meta +8 -0
- package/WebGL/AssetBundle/DownloadHandlerTTAssetBundle.cs +85 -0
- package/WebGL/AssetBundle/DownloadHandlerTTAssetBundle.cs.meta +3 -0
- package/WebGL/AssetBundle/TTAssetBundle.cs +72 -0
- package/WebGL/AssetBundle/TTAssetBundle.cs.meta +3 -0
- package/WebGL/AssetBundle/TTAssetBundleExtensions.cs +25 -0
- package/WebGL/AssetBundle/TTAssetBundleExtensions.cs.meta +3 -0
- package/WebGL/AssetBundle/TTAssetBundleProviders.cs.txt +1301 -0
- package/WebGL/AssetBundle/TTAssetBundleProviders.cs.txt.meta +3 -0
- package/WebGL/AssetBundle/TTAssetBundleRequest.cs +96 -0
- package/WebGL/AssetBundle/TTAssetBundleRequest.cs.meta +3 -0
- package/WebGL/AssetBundle.meta +8 -0
- package/WebGL/Compatibility/UnityCacheCompatibility.cs +49 -0
- package/WebGL/Compatibility/UnityCacheCompatibility.cs.meta +3 -0
- package/WebGL/Compatibility/UnityWebRequestCompatibility.cs +18 -0
- package/WebGL/Compatibility/UnityWebRequestCompatibility.cs.meta +3 -0
- package/WebGL/Compatibility.meta +3 -0
- package/WebGL/FileSystem/TTFileSystemManager.cs +460 -0
- package/WebGL/FileSystem/TTFileSystemManager.cs.meta +11 -0
- package/WebGL/FileSystem/TTFileSystemManagerDefault.cs +1039 -0
- package/WebGL/FileSystem/TTFileSystemManagerDefault.cs.meta +11 -0
- package/WebGL/FileSystem/TTFileSystemManagerWebGL.cs +1278 -0
- package/WebGL/FileSystem/TTFileSystemManagerWebGL.cs.meta +11 -0
- package/WebGL/FileSystem.meta +3 -0
- package/WebGL/Input/Input.cs +230 -0
- package/WebGL/Input/Input.cs.meta +3 -0
- package/WebGL/Input/TTPCInputHandler.cs +199 -0
- package/WebGL/Input/TTPCInputHandler.cs.meta +3 -0
- package/WebGL/Input.meta +3 -0
- package/WebGL/Network/TTUDPSocketHandler.cs +130 -0
- package/WebGL/Network/TTUDPSocketHandler.cs.meta +11 -0
- package/WebGL/Network.meta +3 -0
- package/WebGL/TTAssetBundle.jslib +33 -0
- package/WebGL/TTAssetBundle.jslib.meta +32 -0
- package/WebGL/TTCallbackHandler.cs +139 -0
- package/WebGL/TTCallbackHandler.cs.meta +3 -0
- package/WebGL/TTModel.cs +582 -0
- package/WebGL/TTModel.cs.meta +11 -0
- package/WebGL/TTSDK.jslib +592 -0
- package/WebGL/TTSDK.jslib.meta +32 -0
- package/WebGL/TTSDKType.cs +10 -0
- package/WebGL/TTSDKType.cs.meta +3 -0
- package/WebGL/TTStorageManager.cs +155 -0
- package/WebGL/TTStorageManager.cs.meta +11 -0
- package/WebGL/TTUNBridge.jslib +117 -0
- package/WebGL/TTUNBridge.jslib.meta +32 -0
- package/WebGL/TTVersionAttribute.cs +21 -0
- package/WebGL/TTVersionAttribute.cs.meta +11 -0
- package/WebGL/TTWebGL.asmdef +18 -0
- package/WebGL/TTWebGL.asmdef.meta +7 -0
- package/WebGL/TTWebGLInterface.cs +63 -0
- package/WebGL/TTWebGLInterface.cs.meta +11 -0
- package/WebGL.meta +8 -0
- package/package.json +13 -0
- package/package.json.meta +7 -0
package/WebGL/TTModel.cs
ADDED
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
namespace TTSDK
|
|
2
|
+
{
|
|
3
|
+
public class TTBaseResponse
|
|
4
|
+
{
|
|
5
|
+
public string callbackId; //回调id,调用者不需要关注
|
|
6
|
+
public string errMsg;
|
|
7
|
+
public int errCode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public class TTBaseActionParam<T>
|
|
11
|
+
{
|
|
12
|
+
public System.Action<T> success; //接口调用成功的回调函数
|
|
13
|
+
public System.Action<T> fail; //接口调用失败的回调函数
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public class TTReadFileResponse : TTBaseResponse
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// 如果返回二进制,则数据在这个字段
|
|
20
|
+
/// </summary>
|
|
21
|
+
public byte[] binData;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// 如果返回的是字符串,则数据在这个字段
|
|
25
|
+
/// </summary>
|
|
26
|
+
public string stringData;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public class AccessParam : TTBaseActionParam<TTBaseResponse>
|
|
30
|
+
{
|
|
31
|
+
public string path;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public class UnlinkParam : TTBaseActionParam<TTBaseResponse>
|
|
35
|
+
{
|
|
36
|
+
public string filePath;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public class MkdirParam : TTBaseActionParam<TTBaseResponse>
|
|
40
|
+
{
|
|
41
|
+
/// <summary>
|
|
42
|
+
/// 创建的目录路径 (本地路径)
|
|
43
|
+
/// </summary>
|
|
44
|
+
public string dirPath;
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
/// 是否在递归创建该目录的上级目录后再创建该目录。如果对应的上级目录已经存在,则不创建该上级目录。如 dirPath 为 a/b/c/d 且 recursive 为 true,将创建 a 目录,再在 a 目录下创建 b 目录,以此类推直至创建 a/b/c 目录下的 d 目录。
|
|
48
|
+
/// </summary>
|
|
49
|
+
public bool recursive = false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public class RmdirParam : TTBaseActionParam<TTBaseResponse>
|
|
53
|
+
{
|
|
54
|
+
/// <summary>
|
|
55
|
+
/// 删除的目录路径 (本地路径)
|
|
56
|
+
/// </summary>
|
|
57
|
+
public string dirPath;
|
|
58
|
+
|
|
59
|
+
/// <summary>
|
|
60
|
+
/// 是否递归删除目录。如果为 true,则删除该目录和该目录下的所有子目录以及文件。
|
|
61
|
+
/// </summary>
|
|
62
|
+
public bool recursive = false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public class CopyFileParam : TTBaseActionParam<TTBaseResponse>
|
|
66
|
+
{
|
|
67
|
+
public string srcPath;
|
|
68
|
+
public string destPath;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public class RenameFileParam : TTBaseActionParam<TTBaseResponse>
|
|
72
|
+
{
|
|
73
|
+
public string srcPath;
|
|
74
|
+
public string destPath;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
public class WriteFileParam : TTBaseActionParam<TTBaseResponse>
|
|
78
|
+
{
|
|
79
|
+
/// <summary>
|
|
80
|
+
/// 要写入的文件路径 (本地路径)
|
|
81
|
+
/// </summary>
|
|
82
|
+
public string filePath;
|
|
83
|
+
|
|
84
|
+
/// <summary>
|
|
85
|
+
/// 要写入的二进制数据
|
|
86
|
+
/// </summary>
|
|
87
|
+
public byte[] data;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public class WriteFileStringParam : TTBaseActionParam<TTBaseResponse>
|
|
91
|
+
{
|
|
92
|
+
/// <summary>
|
|
93
|
+
/// 要写入的文件路径 (本地路径)
|
|
94
|
+
/// </summary>
|
|
95
|
+
public string filePath;
|
|
96
|
+
|
|
97
|
+
/// <summary>
|
|
98
|
+
/// 要写入的二进制数据
|
|
99
|
+
/// </summary>
|
|
100
|
+
public string data;
|
|
101
|
+
|
|
102
|
+
/// <summary>
|
|
103
|
+
/// 指定写入文件的字符编码
|
|
104
|
+
/// </summary>
|
|
105
|
+
public string encoding = "utf8";
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public class ReadFileParam : TTBaseActionParam<TTReadFileResponse>
|
|
109
|
+
{
|
|
110
|
+
/// <summary>
|
|
111
|
+
/// 要读取的文件的路径 (本地路径)
|
|
112
|
+
/// </summary>
|
|
113
|
+
public string filePath;
|
|
114
|
+
|
|
115
|
+
/// <summary>
|
|
116
|
+
/// 指定读取文件的字符编码,如果不传 encoding,则以 ArrayBuffer 格式读取文件的二进制内容
|
|
117
|
+
/// </summary>
|
|
118
|
+
public string encoding;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
public class StatParam : TTBaseActionParam<TTStatResponse>
|
|
122
|
+
{
|
|
123
|
+
/// <summary>
|
|
124
|
+
/// 文件/目录路径
|
|
125
|
+
/// </summary>
|
|
126
|
+
public string path;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
public class GetSavedFileListParam : TTBaseActionParam<TTGetSavedFileListResponse>
|
|
130
|
+
{
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
public class TTReadFileCallback : TTBaseResponse
|
|
134
|
+
{
|
|
135
|
+
public string data;
|
|
136
|
+
public int byteLength;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
public class TTGetSavedFileListResponse : TTBaseResponse
|
|
140
|
+
{
|
|
141
|
+
public TTFileInfo[] fileList;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
public class RemoveSavedFileParam : TTBaseActionParam<TTBaseResponse>
|
|
145
|
+
{
|
|
146
|
+
public string FilePath;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
public class TTStatResponse : TTBaseResponse
|
|
150
|
+
{
|
|
151
|
+
public TTStatInfo stat;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public class TTBaseFileInfo
|
|
155
|
+
{
|
|
156
|
+
/// <summary>
|
|
157
|
+
/// 文件大小,单位:B
|
|
158
|
+
/// </summary>
|
|
159
|
+
public long size;
|
|
160
|
+
|
|
161
|
+
/// <summary>
|
|
162
|
+
/// 文件的类型和存取的权限
|
|
163
|
+
/// </summary>
|
|
164
|
+
public int mode;
|
|
165
|
+
|
|
166
|
+
/// <summary>
|
|
167
|
+
/// 判断当前文件是否一个普通文件
|
|
168
|
+
/// </summary>
|
|
169
|
+
/// <returns>是普通文件返回true,不是则返回false</returns>
|
|
170
|
+
public bool IsFile()
|
|
171
|
+
{
|
|
172
|
+
return (61440 & mode) == 32768;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/// <summary>
|
|
176
|
+
/// 判断当前文件是否一个目录
|
|
177
|
+
/// </summary>
|
|
178
|
+
/// <returns>是目录返回true,不是则返回false</returns>
|
|
179
|
+
public bool IsDirectory()
|
|
180
|
+
{
|
|
181
|
+
return (61440 & mode) == 16384;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
public class TTFileInfo : TTBaseFileInfo
|
|
186
|
+
{
|
|
187
|
+
/// <summary>
|
|
188
|
+
/// 文件创建时间
|
|
189
|
+
/// </summary>
|
|
190
|
+
public long createTime;
|
|
191
|
+
|
|
192
|
+
/// <summary>
|
|
193
|
+
/// 文件路径
|
|
194
|
+
/// </summary>
|
|
195
|
+
public string filePath;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
public class TTStatInfo : TTBaseFileInfo
|
|
199
|
+
{
|
|
200
|
+
/// <summary>
|
|
201
|
+
/// 文件最近一次被存取或被执行的时间
|
|
202
|
+
/// </summary>
|
|
203
|
+
public long lastAccessedTime;
|
|
204
|
+
|
|
205
|
+
/// <summary>
|
|
206
|
+
/// 文件最后一次被修改的时间
|
|
207
|
+
/// </summary>
|
|
208
|
+
public long lastModifiedTime;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
public class AppendFileParam : TTBaseActionParam<TTBaseResponse>
|
|
213
|
+
{
|
|
214
|
+
/// <summary>
|
|
215
|
+
/// 要追加写入的文件路径
|
|
216
|
+
/// </summary>
|
|
217
|
+
public string FilePath;
|
|
218
|
+
|
|
219
|
+
/// <summary>
|
|
220
|
+
/// 要追加写入的二进制数据
|
|
221
|
+
/// </summary>
|
|
222
|
+
public byte[] Data;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
public class AppendFileStringParam : TTBaseActionParam<TTBaseResponse>
|
|
226
|
+
{
|
|
227
|
+
/// <summary>
|
|
228
|
+
/// 要追加写入的文件路径
|
|
229
|
+
/// </summary>
|
|
230
|
+
public string FilePath;
|
|
231
|
+
/// <summary>
|
|
232
|
+
/// 要追加写入的数据
|
|
233
|
+
/// </summary>
|
|
234
|
+
public string Data;
|
|
235
|
+
/// <summary>
|
|
236
|
+
/// 指定写入文件的字符编码
|
|
237
|
+
/// </summary>
|
|
238
|
+
public string Encoding = "utf8";
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
public class TTReadDirResponse : TTBaseResponse
|
|
242
|
+
{
|
|
243
|
+
public string[] files;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
public class ReadDirParam : TTBaseActionParam<TTReadDirResponse>
|
|
247
|
+
{
|
|
248
|
+
/// <summary>
|
|
249
|
+
/// 要读取的目录路径
|
|
250
|
+
/// </summary>
|
|
251
|
+
public string DirPath;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
public class TruncateParam : TTBaseActionParam<TTBaseResponse>
|
|
255
|
+
{
|
|
256
|
+
/// <summary>
|
|
257
|
+
/// 要截断的文件路径
|
|
258
|
+
/// </summary>
|
|
259
|
+
public string FilePath;
|
|
260
|
+
/// <summary>
|
|
261
|
+
/// 截断的长度
|
|
262
|
+
/// </summary>
|
|
263
|
+
public int Length;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
public class TTOpenResponse : TTBaseResponse
|
|
267
|
+
{
|
|
268
|
+
/// <summary>
|
|
269
|
+
/// 文件标识符
|
|
270
|
+
/// </summary>
|
|
271
|
+
public string fd;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
public class OpenParam : TTBaseActionParam<TTOpenResponse>
|
|
275
|
+
{
|
|
276
|
+
/// <summary>
|
|
277
|
+
/// 文件路径
|
|
278
|
+
/// </summary>
|
|
279
|
+
public string filePath;
|
|
280
|
+
/// <summary>
|
|
281
|
+
/// 文件系统标志
|
|
282
|
+
/// </summary>
|
|
283
|
+
public string flag;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
public class OpenSyncParam
|
|
287
|
+
{
|
|
288
|
+
/// <summary>
|
|
289
|
+
/// 文件路径
|
|
290
|
+
/// </summary>
|
|
291
|
+
public string filePath;
|
|
292
|
+
/// <summary>
|
|
293
|
+
/// 文件系统标志
|
|
294
|
+
/// </summary>
|
|
295
|
+
public string flag;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
public class CloseParam : TTBaseActionParam<TTBaseResponse>
|
|
299
|
+
{
|
|
300
|
+
/// <summary>
|
|
301
|
+
/// 文件标识符
|
|
302
|
+
/// </summary>
|
|
303
|
+
public string fd;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
public class CloseSyncParam
|
|
307
|
+
{
|
|
308
|
+
/// <summary>
|
|
309
|
+
/// 文件标识符
|
|
310
|
+
/// </summary>
|
|
311
|
+
public string fd;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
public class TTWriteResponse : TTBaseResponse
|
|
315
|
+
{
|
|
316
|
+
/// <summary>
|
|
317
|
+
/// 被写入到文件中的字节数
|
|
318
|
+
/// </summary>
|
|
319
|
+
public int bytesWritten;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
public class WriteParam : TTBaseActionParam<TTWriteResponse>
|
|
323
|
+
{
|
|
324
|
+
/// <summary>
|
|
325
|
+
/// 文件标识符
|
|
326
|
+
/// </summary>
|
|
327
|
+
public string fd;
|
|
328
|
+
/// <summary>
|
|
329
|
+
/// ArrayBuffer 时有效,决定 ArrayBuffer 中要被写入的部位
|
|
330
|
+
/// </summary>
|
|
331
|
+
public int offset;
|
|
332
|
+
/// <summary>
|
|
333
|
+
/// ArrayBuffer 时有效,指定要写入的字节数
|
|
334
|
+
/// </summary>
|
|
335
|
+
public int? length;
|
|
336
|
+
/// <summary>
|
|
337
|
+
/// String 时有效,指定写入文件的字符编码
|
|
338
|
+
/// </summary>
|
|
339
|
+
public string encoding;
|
|
340
|
+
/// <summary>
|
|
341
|
+
/// 文件写入的起始位置
|
|
342
|
+
/// </summary>
|
|
343
|
+
public int? position;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
public class WriteBinParam : WriteParam
|
|
348
|
+
{
|
|
349
|
+
/// <summary>
|
|
350
|
+
/// 写入数据
|
|
351
|
+
/// </summary>
|
|
352
|
+
public byte[] data;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
public class WriteStringParam : WriteParam
|
|
356
|
+
{
|
|
357
|
+
/// <summary>
|
|
358
|
+
/// 写入数据
|
|
359
|
+
/// </summary>
|
|
360
|
+
public string data;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
public class WriteBinSyncParam
|
|
364
|
+
{
|
|
365
|
+
/// <summary>
|
|
366
|
+
/// 文件标识符
|
|
367
|
+
/// </summary>
|
|
368
|
+
public string fd;
|
|
369
|
+
/// <summary>
|
|
370
|
+
/// 写入数据
|
|
371
|
+
/// </summary>
|
|
372
|
+
public byte[] data;
|
|
373
|
+
/// <summary>
|
|
374
|
+
/// ArrayBuffer 时有效,决定 ArrayBuffer 中要被写入的部位
|
|
375
|
+
/// </summary>
|
|
376
|
+
public int offset;
|
|
377
|
+
/// <summary>
|
|
378
|
+
/// ArrayBuffer 时有效,指定要写入的字节数
|
|
379
|
+
/// </summary>
|
|
380
|
+
public int? length;
|
|
381
|
+
/// <summary>
|
|
382
|
+
/// String 时有效,指定写入文件的字符编码
|
|
383
|
+
/// </summary>
|
|
384
|
+
public string encoding;
|
|
385
|
+
/// <summary>
|
|
386
|
+
/// 文件写入的起始位置
|
|
387
|
+
/// </summary>
|
|
388
|
+
public int? position;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
public class WriteStringSyncParam
|
|
392
|
+
{
|
|
393
|
+
/// <summary>
|
|
394
|
+
/// 文件标识符
|
|
395
|
+
/// </summary>
|
|
396
|
+
public string fd;
|
|
397
|
+
/// <summary>
|
|
398
|
+
/// 写入数据
|
|
399
|
+
/// </summary>
|
|
400
|
+
public string data;
|
|
401
|
+
/// <summary>
|
|
402
|
+
/// ArrayBuffer 时有效,决定 ArrayBuffer 中要被写入的部位
|
|
403
|
+
/// </summary>
|
|
404
|
+
public int offset;
|
|
405
|
+
/// <summary>
|
|
406
|
+
/// ArrayBuffer 时有效,指定要写入的字节数
|
|
407
|
+
/// </summary>
|
|
408
|
+
public int? length;
|
|
409
|
+
/// <summary>
|
|
410
|
+
/// String 时有效,指定写入文件的字符编码
|
|
411
|
+
/// </summary>
|
|
412
|
+
public string encoding;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
public class WriteResult
|
|
416
|
+
{
|
|
417
|
+
/// <summary>
|
|
418
|
+
/// 被写入到文件中的字节数
|
|
419
|
+
/// </summary>
|
|
420
|
+
public int bytesWritten;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
public class TTReadResponse : TTBaseResponse
|
|
424
|
+
{
|
|
425
|
+
/// <summary>
|
|
426
|
+
/// 被写入的缓存区的对象
|
|
427
|
+
/// </summary>
|
|
428
|
+
public byte[] arrayBuffer;
|
|
429
|
+
/// <summary>
|
|
430
|
+
/// 实际读取的字节数
|
|
431
|
+
/// </summary>
|
|
432
|
+
public int bytesRead;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
public class ReadParam : TTBaseActionParam<TTReadResponse>
|
|
436
|
+
{
|
|
437
|
+
/// <summary>
|
|
438
|
+
/// 文件标识符
|
|
439
|
+
/// </summary>
|
|
440
|
+
public string fd;
|
|
441
|
+
/// <summary>
|
|
442
|
+
/// 数据
|
|
443
|
+
/// </summary>
|
|
444
|
+
public byte[] arrayBuffer;
|
|
445
|
+
/// <summary>
|
|
446
|
+
/// 缓冲区中的写入偏移量
|
|
447
|
+
/// </summary>
|
|
448
|
+
public int offset;
|
|
449
|
+
/// <summary>
|
|
450
|
+
/// 要从文件中读取的字节数
|
|
451
|
+
/// </summary>
|
|
452
|
+
public int length;
|
|
453
|
+
/// <summary>
|
|
454
|
+
/// 文件读取的起始位置
|
|
455
|
+
/// </summary>
|
|
456
|
+
public int? position;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
public class ReadSyncParam
|
|
460
|
+
{
|
|
461
|
+
/// <summary>
|
|
462
|
+
/// 文件标识符
|
|
463
|
+
/// </summary>
|
|
464
|
+
public string fd;
|
|
465
|
+
/// <summary>
|
|
466
|
+
/// 数据
|
|
467
|
+
/// </summary>
|
|
468
|
+
public byte[] arrayBuffer;
|
|
469
|
+
/// <summary>
|
|
470
|
+
/// 缓冲区中的写入偏移量
|
|
471
|
+
/// </summary>
|
|
472
|
+
public int offset;
|
|
473
|
+
/// <summary>
|
|
474
|
+
/// 要从文件中读取的字节数
|
|
475
|
+
/// </summary>
|
|
476
|
+
public int length;
|
|
477
|
+
/// <summary>
|
|
478
|
+
/// 文件读取的起始位置
|
|
479
|
+
/// </summary>
|
|
480
|
+
public int? position;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
public class ReadResult
|
|
484
|
+
{
|
|
485
|
+
/// <summary>
|
|
486
|
+
/// 被写入的缓存区的对象
|
|
487
|
+
/// </summary>
|
|
488
|
+
public byte[] arrayBuffer;
|
|
489
|
+
/// <summary>
|
|
490
|
+
/// 实际读取的字节数
|
|
491
|
+
/// </summary>
|
|
492
|
+
public int bytesRead;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
public class TTReadCompressedCallback : TTBaseResponse
|
|
496
|
+
{
|
|
497
|
+
/// <summary>
|
|
498
|
+
/// 文件长度
|
|
499
|
+
/// </summary>
|
|
500
|
+
public int byteLength;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
public class TTReadCompressedFileResponse : TTBaseResponse
|
|
504
|
+
{
|
|
505
|
+
/// <summary>
|
|
506
|
+
/// 文件内容
|
|
507
|
+
/// </summary>
|
|
508
|
+
public byte[] arrayBuffer;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
public class ReadCompressedFileParam : TTBaseActionParam<TTReadCompressedFileResponse>
|
|
512
|
+
{
|
|
513
|
+
/// <summary>
|
|
514
|
+
/// 文件路径
|
|
515
|
+
/// </summary>
|
|
516
|
+
public string filePath;
|
|
517
|
+
/// <summary>
|
|
518
|
+
/// 文件压缩类型
|
|
519
|
+
/// </summary>
|
|
520
|
+
public string compressionAlgorithm;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
public class ReadCompressedFileSyncParam
|
|
524
|
+
{
|
|
525
|
+
/// <summary>
|
|
526
|
+
/// 文件路径
|
|
527
|
+
/// </summary>
|
|
528
|
+
public string filePath;
|
|
529
|
+
/// <summary>
|
|
530
|
+
/// 文件压缩类型
|
|
531
|
+
/// </summary>
|
|
532
|
+
public string compressionAlgorithm;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
public class FstatResponse : TTBaseResponse
|
|
536
|
+
{
|
|
537
|
+
/// <summary>
|
|
538
|
+
/// 文件状态
|
|
539
|
+
/// </summary>
|
|
540
|
+
public TTStatInfo stats;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
public class FstatParam : TTBaseActionParam<FstatResponse>
|
|
544
|
+
{
|
|
545
|
+
/// <summary>
|
|
546
|
+
/// 文件标识符
|
|
547
|
+
/// </summary>
|
|
548
|
+
public string fd;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
public class FstatSyncParam
|
|
552
|
+
{
|
|
553
|
+
/// <summary>
|
|
554
|
+
/// 文件标识符
|
|
555
|
+
/// </summary>
|
|
556
|
+
public string fd;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
public class FtruncateParam : TTBaseActionParam<TTBaseResponse>
|
|
560
|
+
{
|
|
561
|
+
/// <summary>
|
|
562
|
+
/// 文件标识符
|
|
563
|
+
/// </summary>
|
|
564
|
+
public string fd;
|
|
565
|
+
/// <summary>
|
|
566
|
+
/// 截断位置
|
|
567
|
+
/// </summary>
|
|
568
|
+
public int length;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
public class FtruncateSyncParam
|
|
572
|
+
{
|
|
573
|
+
/// <summary>
|
|
574
|
+
/// 文件标识符
|
|
575
|
+
/// </summary>
|
|
576
|
+
public string fd;
|
|
577
|
+
/// <summary>
|
|
578
|
+
/// 截断位置
|
|
579
|
+
/// </summary>
|
|
580
|
+
public int length;
|
|
581
|
+
}
|
|
582
|
+
}
|