Tamar 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,345 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html>
4
+ <head>
5
+ <title>Reference</title>
6
+ <link rel="stylesheet" href="../luadoc.css" type="text/css" />
7
+ <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
8
+ </head>
9
+
10
+ <body>
11
+ <div id="container">
12
+
13
+ <div id="product">
14
+ <div id="product_logo"></div>
15
+ <div id="product_name"><big><b></b></big></div>
16
+ <div id="product_description"></div>
17
+ </div> <!-- id="product" -->
18
+
19
+ <div id="main">
20
+
21
+ <div id="navigation">
22
+
23
+
24
+ <h1>LuaDoc</h1>
25
+ <ul>
26
+
27
+ <li><a href="../index.html">Index</a></li>
28
+
29
+ </ul>
30
+
31
+
32
+ <!-- Module list -->
33
+
34
+ <h1>Modules</h1>
35
+ <ul>
36
+
37
+ <li>
38
+ <a href="../modules/dist.html">dist</a>
39
+ </li>
40
+
41
+ <li>
42
+ <a href="../modules/dist.dep.html">dist.dep</a>
43
+ </li>
44
+
45
+ <li>
46
+ <a href="../modules/dist.fetch.html">dist.fetch</a>
47
+ </li>
48
+
49
+ <li>
50
+ <a href="../modules/dist.log.html">dist.log</a>
51
+ </li>
52
+
53
+ <li>
54
+ <a href="../modules/dist.manifest.html">dist.manifest</a>
55
+ </li>
56
+
57
+ <li>
58
+ <a href="../modules/dist.package.html">dist.package</a>
59
+ </li>
60
+
61
+ <li><strong>dist.persist</strong></li>
62
+
63
+ <li>
64
+ <a href="../modules/dist.sys.html">dist.sys</a>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+
70
+
71
+ <!-- File list -->
72
+
73
+
74
+
75
+
76
+
77
+
78
+ </div><!-- id="navigation" -->
79
+
80
+ <div id="content">
81
+
82
+ <h1>Module <code>dist.persist</code></h1>
83
+
84
+ <p>Persistency table serializarion. 2DO: If a better persistency dist with good readability becomes available change this code This module contains functions that deal with serialization and loading of tables. loadText - text 2 table load - file 2 table saveText - table 2 text save - table 2 file saveManifest - variant of save for manifests</p>
85
+
86
+
87
+
88
+
89
+
90
+ <h2>Functions</h2>
91
+ <table class="function_list">
92
+
93
+ <tr>
94
+ <td class="name" nowrap><a href="#load">load</a>&nbsp;(filename)</td>
95
+ <td class="summary">Load table from file.</td>
96
+ </tr>
97
+
98
+ <tr>
99
+ <td class="name" nowrap><a href="#loadText">loadText</a>&nbsp;(text)</td>
100
+ <td class="summary">Load table from text.</td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <td class="name" nowrap><a href="#save">save</a>&nbsp;(filename, tbl)</td>
105
+ <td class="summary">Save table to file.</td>
106
+ </tr>
107
+
108
+ <tr>
109
+ <td class="name" nowrap><a href="#saveManifest">saveManifest</a>&nbsp;(filename, dists)</td>
110
+ <td class="summary">Special serialization formating for manifests.</td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td class="name" nowrap><a href="#saveText">saveText</a>&nbsp;(tbl)</td>
115
+ <td class="summary">Save table to string.</td>
116
+ </tr>
117
+
118
+ <tr>
119
+ <td class="name" nowrap><a href="#serialize">serialize</a>&nbsp;(o, d, tbl)</td>
120
+ <td class="summary">Serialize a table into text.</td>
121
+ </tr>
122
+
123
+ </table>
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <br/>
131
+ <br/>
132
+
133
+
134
+
135
+ <h2><a name="functions"></a>Functions</h2>
136
+ <dl class="function">
137
+
138
+
139
+
140
+ <dt><a name="load"></a><strong>load</strong>&nbsp;(filename)</dt>
141
+ <dd>
142
+ Load table from file.
143
+
144
+
145
+ <h3>Parameters</h3>
146
+ <ul>
147
+
148
+ <li>
149
+ filename: string: File to load table from
150
+ </li>
151
+
152
+ </ul>
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <h3>Return value:</h3>
160
+ table, log: Returns table on success, nil on failure and log message.
161
+
162
+
163
+
164
+ </dd>
165
+
166
+
167
+
168
+
169
+ <dt><a name="loadText"></a><strong>loadText</strong>&nbsp;(text)</dt>
170
+ <dd>
171
+ Load table from text.
172
+
173
+
174
+ <h3>Parameters</h3>
175
+ <ul>
176
+
177
+ <li>
178
+ text: string: Text to load table from.
179
+ </li>
180
+
181
+ </ul>
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <h3>Return value:</h3>
189
+ table, log: Returns table on success, nil on failure and log message.
190
+
191
+
192
+
193
+ </dd>
194
+
195
+
196
+
197
+
198
+ <dt><a name="save"></a><strong>save</strong>&nbsp;(filename, tbl)</dt>
199
+ <dd>
200
+ Save table to file.
201
+
202
+
203
+ <h3>Parameters</h3>
204
+ <ul>
205
+
206
+ <li>
207
+ filename: string: File to save table to.
208
+ </li>
209
+
210
+ <li>
211
+ tbl: table: Table to save.
212
+ </li>
213
+
214
+ </ul>
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <h3>Return value:</h3>
222
+ ok, log: Returns true on success, nil on failure and log message.
223
+
224
+
225
+
226
+ </dd>
227
+
228
+
229
+
230
+
231
+ <dt><a name="saveManifest"></a><strong>saveManifest</strong>&nbsp;(filename, dists)</dt>
232
+ <dd>
233
+ Special serialization formating for manifests.
234
+
235
+
236
+ <h3>Parameters</h3>
237
+ <ul>
238
+
239
+ <li>
240
+ filename: string: Path to save manifest to
241
+ </li>
242
+
243
+ <li>
244
+ dists:
245
+ </li>
246
+
247
+ </ul>
248
+
249
+
250
+
251
+
252
+
253
+
254
+ <h3>Return value:</h3>
255
+ ok, log: Returns true on success, nil on failure and log message.
256
+
257
+
258
+
259
+ </dd>
260
+
261
+
262
+
263
+
264
+ <dt><a name="saveText"></a><strong>saveText</strong>&nbsp;(tbl)</dt>
265
+ <dd>
266
+ Save table to string. Used for dist.info.
267
+
268
+
269
+ <h3>Parameters</h3>
270
+ <ul>
271
+
272
+ <li>
273
+ tbl: table: Table to save.
274
+ </li>
275
+
276
+ </ul>
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <h3>Return value:</h3>
284
+ out string: Serialized text.
285
+
286
+
287
+
288
+ </dd>
289
+
290
+
291
+
292
+
293
+ <dt><a name="serialize"></a><strong>serialize</strong>&nbsp;(o, d, tbl)</dt>
294
+ <dd>
295
+ Serialize a table into text.
296
+
297
+
298
+ <h3>Parameters</h3>
299
+ <ul>
300
+
301
+ <li>
302
+ o:
303
+ </li>
304
+
305
+ <li>
306
+ d: number: Intendation lenght.
307
+ </li>
308
+
309
+ <li>
310
+ tbl: table: Table to serialize.
311
+ </li>
312
+
313
+ </ul>
314
+
315
+
316
+
317
+
318
+
319
+
320
+ <h3>Return value:</h3>
321
+ out string: Serialized text.
322
+
323
+
324
+
325
+ </dd>
326
+
327
+
328
+ </dl>
329
+
330
+
331
+
332
+
333
+
334
+
335
+ </div> <!-- id="content" -->
336
+
337
+ </div> <!-- id="main" -->
338
+
339
+ <div id="about">
340
+ <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
341
+ </div> <!-- id="about" -->
342
+
343
+ </div> <!-- id="container" -->
344
+ </body>
345
+ </html>
@@ -0,0 +1,1058 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html>
4
+ <head>
5
+ <title>Reference</title>
6
+ <link rel="stylesheet" href="../luadoc.css" type="text/css" />
7
+ <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
8
+ </head>
9
+
10
+ <body>
11
+ <div id="container">
12
+
13
+ <div id="product">
14
+ <div id="product_logo"></div>
15
+ <div id="product_name"><big><b></b></big></div>
16
+ <div id="product_description"></div>
17
+ </div> <!-- id="product" -->
18
+
19
+ <div id="main">
20
+
21
+ <div id="navigation">
22
+
23
+
24
+ <h1>LuaDoc</h1>
25
+ <ul>
26
+
27
+ <li><a href="../index.html">Index</a></li>
28
+
29
+ </ul>
30
+
31
+
32
+ <!-- Module list -->
33
+
34
+ <h1>Modules</h1>
35
+ <ul>
36
+
37
+ <li>
38
+ <a href="../modules/dist.html">dist</a>
39
+ </li>
40
+
41
+ <li>
42
+ <a href="../modules/dist.dep.html">dist.dep</a>
43
+ </li>
44
+
45
+ <li>
46
+ <a href="../modules/dist.fetch.html">dist.fetch</a>
47
+ </li>
48
+
49
+ <li>
50
+ <a href="../modules/dist.log.html">dist.log</a>
51
+ </li>
52
+
53
+ <li>
54
+ <a href="../modules/dist.manifest.html">dist.manifest</a>
55
+ </li>
56
+
57
+ <li>
58
+ <a href="../modules/dist.package.html">dist.package</a>
59
+ </li>
60
+
61
+ <li>
62
+ <a href="../modules/dist.persist.html">dist.persist</a>
63
+ </li>
64
+
65
+ <li><strong>dist.sys</strong></li>
66
+
67
+ </ul>
68
+
69
+
70
+
71
+ <!-- File list -->
72
+
73
+
74
+
75
+
76
+
77
+
78
+ </div><!-- id="navigation" -->
79
+
80
+ <div id="content">
81
+
82
+ <h1>Module <code>dist.sys</code></h1>
83
+
84
+ <p>Host system dependent commands. Override the default UNIX commands if needed for your platform. Commands currently depend on popen and unzip being available. For future releases we would like to use lua packages handling the compression issues. Additionally some filesystem functionality not available in luafilesystem is emulated here.</p>
85
+
86
+
87
+
88
+
89
+
90
+ <h2>Functions</h2>
91
+ <table class="function_list">
92
+
93
+ <tr>
94
+ <td class="name" nowrap><a href="#Q">Q</a>&nbsp;(arg)</td>
95
+ <td class="summary">Quote argument for shell processing (Windows).</td>
96
+ </tr>
97
+
98
+ <tr>
99
+ <td class="name" nowrap><a href="#Q">Q</a>&nbsp;(arg)</td>
100
+ <td class="summary">Quote argument for shell processing (Windows).</td>
101
+ </tr>
102
+
103
+ <tr>
104
+ <td class="name" nowrap><a href="#copy">copy</a>&nbsp;(src, dest)</td>
105
+ <td class="summary">Recursive copy a file or directory (Windows).</td>
106
+ </tr>
107
+
108
+ <tr>
109
+ <td class="name" nowrap><a href="#copy">copy</a>&nbsp;(src, dest)</td>
110
+ <td class="summary">Recursive copy a file or directory (Windows).</td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td class="name" nowrap><a href="#curDir">curDir</a>&nbsp;()</td>
115
+ <td class="summary">Get current directory.</td>
116
+ </tr>
117
+
118
+ <tr>
119
+ <td class="name" nowrap><a href="#delete">delete</a>&nbsp;(dir)</td>
120
+ <td class="summary">Delete a file or a directory and all its contents (Windows).</td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td class="name" nowrap><a href="#delete">delete</a>&nbsp;(dir)</td>
125
+ <td class="summary">Delete a file or a directory and all its contents (Windows).</td>
126
+ </tr>
127
+
128
+ <tr>
129
+ <td class="name" nowrap><a href="#dir">dir</a>&nbsp;(dir, path)</td>
130
+ <td class="summary">List the contents of a directory.</td>
131
+ </tr>
132
+
133
+ <tr>
134
+ <td class="name" nowrap><a href="#execute">execute</a>&nbsp;(command, ...)</td>
135
+ <td class="summary">Run the given system command, quoting its arguments.</td>
136
+ </tr>
137
+
138
+ <tr>
139
+ <td class="name" nowrap><a href="#executeString">executeString</a>&nbsp;(cmd)</td>
140
+ <td class="summary">Run the given system command.</td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <td class="name" nowrap><a href="#exists">exists</a>&nbsp;(dir, path)</td>
145
+ <td class="summary">Test for existance of a file.</td>
146
+ </tr>
147
+
148
+ <tr>
149
+ <td class="name" nowrap><a href="#forceDelete">forceDelete</a>&nbsp;(src)</td>
150
+ <td class="summary">Force delete a file, even if it is open.</td>
151
+ </tr>
152
+
153
+ <tr>
154
+ <td class="name" nowrap><a href="#getZipFile">getZipFile</a>&nbsp;(zipfile, file)</td>
155
+ <td class="summary">Extract file contents of a file from archive </td>
156
+ </tr>
157
+
158
+ <tr>
159
+ <td class="name" nowrap><a href="#isDir">isDir</a>&nbsp;(dir, path)</td>
160
+ <td class="summary">Test is pathname is a directory.</td>
161
+ </tr>
162
+
163
+ <tr>
164
+ <td class="name" nowrap><a href="#isFile">isFile</a>&nbsp;(dir, path)</td>
165
+ <td class="summary">Test is pathname is a file.</td>
166
+ </tr>
167
+
168
+ <tr>
169
+ <td class="name" nowrap><a href="#list">list</a>&nbsp;(dir, path)</td>
170
+ <td class="summary">Recursively list the contents of a directory.</td>
171
+ </tr>
172
+
173
+ <tr>
174
+ <td class="name" nowrap><a href="#makeDir">makeDir</a>&nbsp;(dir)</td>
175
+ <td class="summary">Create a directory.</td>
176
+ </tr>
177
+
178
+ <tr>
179
+ <td class="name" nowrap><a href="#makeStart">makeStart</a>&nbsp;(dest)</td>
180
+ <td class="summary">Create environment startup script (Windows).</td>
181
+ </tr>
182
+
183
+ <tr>
184
+ <td class="name" nowrap><a href="#makeStart">makeStart</a>&nbsp;(dest)</td>
185
+ <td class="summary">Create environment startup script (Windows).</td>
186
+ </tr>
187
+
188
+ <tr>
189
+ <td class="name" nowrap><a href="#move">move</a>&nbsp;(src, dest)</td>
190
+ <td class="summary">Move a file from one location to another (Windows).</td>
191
+ </tr>
192
+
193
+ <tr>
194
+ <td class="name" nowrap><a href="#move">move</a>&nbsp;(src, dest)</td>
195
+ <td class="summary">Move a file from one location to another (Windows).</td>
196
+ </tr>
197
+
198
+ <tr>
199
+ <td class="name" nowrap><a href="#path">path</a>&nbsp;(...)</td>
200
+ <td class="summary">Compose full system path or part of url </td>
201
+ </tr>
202
+
203
+ <tr>
204
+ <td class="name" nowrap><a href="#pathLen">pathLen</a>&nbsp;(dir)</td>
205
+ <td class="summary">little helper function to get file depth (for directories its +1) </td>
206
+ </tr>
207
+
208
+ <tr>
209
+ <td class="name" nowrap><a href="#relLink">relLink</a>&nbsp;(src, dest, from)</td>
210
+ <td class="summary">Relatively Link file or directory contents to destination.</td>
211
+ </tr>
212
+
213
+ <tr>
214
+ <td class="name" nowrap><a href="#unzip">unzip</a>&nbsp;(archive, dest)</td>
215
+ <td class="summary">Unpack an archive.</td>
216
+ </tr>
217
+
218
+ <tr>
219
+ <td class="name" nowrap><a href="#zip">zip</a>&nbsp;(workdir, zipfile, ...)</td>
220
+ <td class="summary">Compress files in a .zip archive.</td>
221
+ </tr>
222
+
223
+ </table>
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <br/>
231
+ <br/>
232
+
233
+
234
+
235
+ <h2><a name="functions"></a>Functions</h2>
236
+ <dl class="function">
237
+
238
+
239
+
240
+ <dt><a name="Q"></a><strong>Q</strong>&nbsp;(arg)</dt>
241
+ <dd>
242
+ Quote argument for shell processing (Windows). Adds single quotes and escapes.
243
+
244
+
245
+ <h3>Parameters</h3>
246
+ <ul>
247
+
248
+ <li>
249
+ arg: string: Unquoted argument.
250
+ </li>
251
+
252
+ </ul>
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <h3>Return value:</h3>
260
+ string: Quoted argument.
261
+
262
+
263
+
264
+ </dd>
265
+
266
+
267
+
268
+
269
+ <dt><a name="Q"></a><strong>Q</strong>&nbsp;(arg)</dt>
270
+ <dd>
271
+ Quote argument for shell processing (Windows). Adds single quotes and escapes.
272
+
273
+
274
+ <h3>Parameters</h3>
275
+ <ul>
276
+
277
+ <li>
278
+ arg: string: Unquoted argument.
279
+ </li>
280
+
281
+ </ul>
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <h3>Return value:</h3>
289
+ string: Quoted argument.
290
+
291
+
292
+
293
+ </dd>
294
+
295
+
296
+
297
+
298
+ <dt><a name="copy"></a><strong>copy</strong>&nbsp;(src, dest)</dt>
299
+ <dd>
300
+ Recursive copy a file or directory (Windows).
301
+
302
+
303
+ <h3>Parameters</h3>
304
+ <ul>
305
+
306
+ <li>
307
+ src: string: Pathname of source
308
+ </li>
309
+
310
+ <li>
311
+ dest: string: Pathname of destination. If `src` is a directory, copies contents of `src` into contents of directory `dest`. Otherwise, both must represent files.
312
+ </li>
313
+
314
+ </ul>
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <h3>Return value:</h3>
322
+ ok, log: true on success, false on failure and log message.
323
+
324
+
325
+
326
+ </dd>
327
+
328
+
329
+
330
+
331
+ <dt><a name="copy"></a><strong>copy</strong>&nbsp;(src, dest)</dt>
332
+ <dd>
333
+ Recursive copy a file or directory (Windows).
334
+
335
+
336
+ <h3>Parameters</h3>
337
+ <ul>
338
+
339
+ <li>
340
+ src: string: Pathname of source
341
+ </li>
342
+
343
+ <li>
344
+ dest: string: Pathname of destination. If `src` is a directory, copies contents of `src` into contents of directory `dest`. Otherwise, both must represent files.
345
+ </li>
346
+
347
+ </ul>
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <h3>Return value:</h3>
355
+ ok, log: true on success, false on failure and log message.
356
+
357
+
358
+
359
+ </dd>
360
+
361
+
362
+
363
+
364
+ <dt><a name="curDir"></a><strong>curDir</strong>&nbsp;()</dt>
365
+ <dd>
366
+ Get current directory.
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <h3>Return value:</h3>
375
+ string: current direcotry.
376
+
377
+
378
+
379
+ </dd>
380
+
381
+
382
+
383
+
384
+ <dt><a name="delete"></a><strong>delete</strong>&nbsp;(dir)</dt>
385
+ <dd>
386
+ Delete a file or a directory and all its contents (Windows). For safety, this only accepts absolute paths.
387
+
388
+
389
+ <h3>Parameters</h3>
390
+ <ul>
391
+
392
+ <li>
393
+ dir: string: Pathname of the file or directory to delete
394
+ </li>
395
+
396
+ </ul>
397
+
398
+
399
+
400
+
401
+
402
+
403
+ <h3>Return value:</h3>
404
+ ok, log: true on success, false on failure and log message. Returns success if already deleted.
405
+
406
+
407
+
408
+ </dd>
409
+
410
+
411
+
412
+
413
+ <dt><a name="delete"></a><strong>delete</strong>&nbsp;(dir)</dt>
414
+ <dd>
415
+ Delete a file or a directory and all its contents (Windows). For safety, this only accepts absolute paths.
416
+
417
+
418
+ <h3>Parameters</h3>
419
+ <ul>
420
+
421
+ <li>
422
+ dir: string: Pathname of the file or directory to delete
423
+ </li>
424
+
425
+ </ul>
426
+
427
+
428
+
429
+
430
+
431
+
432
+ <h3>Return value:</h3>
433
+ ok, log: true on success, false on failure and log message. Returns success if already deleted.
434
+
435
+
436
+
437
+ </dd>
438
+
439
+
440
+
441
+
442
+ <dt><a name="dir"></a><strong>dir</strong>&nbsp;(dir, path)</dt>
443
+ <dd>
444
+ List the contents of a directory.
445
+
446
+
447
+ <h3>Parameters</h3>
448
+ <ul>
449
+
450
+ <li>
451
+ dir:
452
+ </li>
453
+
454
+ <li>
455
+ path: string: directory to list if not specified the current directory will be used.
456
+ </li>
457
+
458
+ </ul>
459
+
460
+
461
+
462
+
463
+
464
+
465
+ <h3>Return value:</h3>
466
+ table: an array of strings with the filenames representing the contents of a directory.
467
+
468
+
469
+
470
+ </dd>
471
+
472
+
473
+
474
+
475
+ <dt><a name="execute"></a><strong>execute</strong>&nbsp;(command, ...)</dt>
476
+ <dd>
477
+ Run the given system command, quoting its arguments. The command is executed in the current directory in the dir stack.
478
+
479
+
480
+ <h3>Parameters</h3>
481
+ <ul>
482
+
483
+ <li>
484
+ command: string: The command to be executed. No quoting/escaping need to be applied.
485
+ </li>
486
+
487
+ <li>
488
+ ...: strings: containing additional arguments, which are quoted.
489
+ </li>
490
+
491
+ </ul>
492
+
493
+
494
+
495
+
496
+
497
+
498
+ <h3>Return value:</h3>
499
+ ok, log: true on success, false on failure and log message.
500
+
501
+
502
+
503
+ </dd>
504
+
505
+
506
+
507
+
508
+ <dt><a name="executeString"></a><strong>executeString</strong>&nbsp;(cmd)</dt>
509
+ <dd>
510
+ Run the given system command. The command is executed in the current directory in the dir stack.
511
+
512
+
513
+ <h3>Parameters</h3>
514
+ <ul>
515
+
516
+ <li>
517
+ cmd: string: No quoting/escaping is applied to the command.
518
+ </li>
519
+
520
+ </ul>
521
+
522
+
523
+
524
+
525
+
526
+
527
+ <h3>Return value:</h3>
528
+ boolean: True if command succeeds, false otherwise.
529
+
530
+
531
+
532
+ </dd>
533
+
534
+
535
+
536
+
537
+ <dt><a name="exists"></a><strong>exists</strong>&nbsp;(dir, path)</dt>
538
+ <dd>
539
+ Test for existance of a file.
540
+
541
+
542
+ <h3>Parameters</h3>
543
+ <ul>
544
+
545
+ <li>
546
+ dir:
547
+ </li>
548
+
549
+ <li>
550
+ path: string: filename to test
551
+ </li>
552
+
553
+ </ul>
554
+
555
+
556
+
557
+
558
+
559
+
560
+ <h3>Return value:</h3>
561
+ ok, log: true on success, false on failure and log message.
562
+
563
+
564
+
565
+ </dd>
566
+
567
+
568
+
569
+
570
+ <dt><a name="forceDelete"></a><strong>forceDelete</strong>&nbsp;(src)</dt>
571
+ <dd>
572
+ Force delete a file, even if it is open. If the file can't be deleted because it is currently open, this function will try to rename the file to a temporary file in the same directory. Windows in particular doesn't allow running executables to be deleted, but it does allow them to be renamed. Cygwin 1.7 (unlike 1.5) does allow such deletion but internally implements it via a mechanism like this. For futher details, see http://sourceforge.net/mailarchive/message.php?msg_name=bc4ed2190909261323i7c6280bfp6e7be6f70c713b0c%40mail.gmail.com
573
+
574
+
575
+ <h3>Parameters</h3>
576
+ <ul>
577
+
578
+ <li>
579
+ src: - file name
580
+ </li>
581
+
582
+ </ul>
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+ </dd>
592
+
593
+
594
+
595
+
596
+ <dt><a name="getZipFile"></a><strong>getZipFile</strong>&nbsp;(zipfile, file)</dt>
597
+ <dd>
598
+ Extract file contents of a file from archive
599
+
600
+
601
+ <h3>Parameters</h3>
602
+ <ul>
603
+
604
+ <li>
605
+ zipfile: string: pathname of .zip/.dist archive to read from.
606
+ </li>
607
+
608
+ <li>
609
+ file: string: file to get contents of.
610
+ </li>
611
+
612
+ </ul>
613
+
614
+
615
+
616
+
617
+
618
+
619
+ <h3>Return value:</h3>
620
+ contents, err: returns contents of file or false and error message. Requires io.popen (2DO: work when io.popen not available?)
621
+
622
+
623
+
624
+ </dd>
625
+
626
+
627
+
628
+
629
+ <dt><a name="isDir"></a><strong>isDir</strong>&nbsp;(dir, path)</dt>
630
+ <dd>
631
+ Test is pathname is a directory.
632
+
633
+
634
+ <h3>Parameters</h3>
635
+ <ul>
636
+
637
+ <li>
638
+ dir:
639
+ </li>
640
+
641
+ <li>
642
+ path: string: pathname to test
643
+ </li>
644
+
645
+ </ul>
646
+
647
+
648
+
649
+
650
+
651
+
652
+ <h3>Return value:</h3>
653
+ ok, log: true on success, false on failure and log message.
654
+
655
+
656
+
657
+ </dd>
658
+
659
+
660
+
661
+
662
+ <dt><a name="isFile"></a><strong>isFile</strong>&nbsp;(dir, path)</dt>
663
+ <dd>
664
+ Test is pathname is a file.
665
+
666
+
667
+ <h3>Parameters</h3>
668
+ <ul>
669
+
670
+ <li>
671
+ dir:
672
+ </li>
673
+
674
+ <li>
675
+ path: string: pathname to test
676
+ </li>
677
+
678
+ </ul>
679
+
680
+
681
+
682
+
683
+
684
+
685
+ <h3>Return value:</h3>
686
+ ok, log: true on success, false on failure and log message.
687
+
688
+
689
+
690
+ </dd>
691
+
692
+
693
+
694
+
695
+ <dt><a name="list"></a><strong>list</strong>&nbsp;(dir, path)</dt>
696
+ <dd>
697
+ Recursively list the contents of a directory.
698
+
699
+
700
+ <h3>Parameters</h3>
701
+ <ul>
702
+
703
+ <li>
704
+ dir:
705
+ </li>
706
+
707
+ <li>
708
+ path: string: directory to list if not specified the current directory will be used
709
+ </li>
710
+
711
+ </ul>
712
+
713
+
714
+
715
+
716
+
717
+
718
+ <h3>Return value:</h3>
719
+ table: an array of strings representing the contents of the directory structure
720
+
721
+
722
+
723
+ </dd>
724
+
725
+
726
+
727
+
728
+ <dt><a name="makeDir"></a><strong>makeDir</strong>&nbsp;(dir)</dt>
729
+ <dd>
730
+ Create a directory.
731
+
732
+
733
+ <h3>Parameters</h3>
734
+ <ul>
735
+
736
+ <li>
737
+ dir: string: Path to create.
738
+ </li>
739
+
740
+ </ul>
741
+
742
+
743
+
744
+
745
+
746
+
747
+ <h3>Return value:</h3>
748
+ ok, log: true on success, false on failure and log message. Succeeds if already exists.
749
+
750
+
751
+
752
+ </dd>
753
+
754
+
755
+
756
+
757
+ <dt><a name="makeStart"></a><strong>makeStart</strong>&nbsp;(dest)</dt>
758
+ <dd>
759
+ Create environment startup script (Windows).
760
+
761
+
762
+ <h3>Parameters</h3>
763
+ <ul>
764
+
765
+ <li>
766
+ dest: string: Dir to generate the file in.
767
+ </li>
768
+
769
+ </ul>
770
+
771
+
772
+
773
+
774
+
775
+
776
+ <h3>Return value:</h3>
777
+ ok, log: true on success, false on failure and log message.
778
+
779
+
780
+
781
+ </dd>
782
+
783
+
784
+
785
+
786
+ <dt><a name="makeStart"></a><strong>makeStart</strong>&nbsp;(dest)</dt>
787
+ <dd>
788
+ Create environment startup script (Windows).
789
+
790
+
791
+ <h3>Parameters</h3>
792
+ <ul>
793
+
794
+ <li>
795
+ dest: string: Dir to generate the file in.
796
+ </li>
797
+
798
+ </ul>
799
+
800
+
801
+
802
+
803
+
804
+
805
+ <h3>Return value:</h3>
806
+ ok, log: true on success, false on failure and log message.
807
+
808
+
809
+
810
+ </dd>
811
+
812
+
813
+
814
+
815
+ <dt><a name="move"></a><strong>move</strong>&nbsp;(src, dest)</dt>
816
+ <dd>
817
+ Move a file from one location to another (Windows).
818
+
819
+
820
+ <h3>Parameters</h3>
821
+ <ul>
822
+
823
+ <li>
824
+ src: string: Pathname of source.
825
+ </li>
826
+
827
+ <li>
828
+ dest: string: Pathname of destination.
829
+ </li>
830
+
831
+ </ul>
832
+
833
+
834
+
835
+
836
+
837
+
838
+ <h3>Return value:</h3>
839
+ ok, log: true on success, false on failure and log message.
840
+
841
+
842
+
843
+ </dd>
844
+
845
+
846
+
847
+
848
+ <dt><a name="move"></a><strong>move</strong>&nbsp;(src, dest)</dt>
849
+ <dd>
850
+ Move a file from one location to another (Windows).
851
+
852
+
853
+ <h3>Parameters</h3>
854
+ <ul>
855
+
856
+ <li>
857
+ src: string: Pathname of source.
858
+ </li>
859
+
860
+ <li>
861
+ dest: string: Pathname of destination.
862
+ </li>
863
+
864
+ </ul>
865
+
866
+
867
+
868
+
869
+
870
+
871
+ <h3>Return value:</h3>
872
+ ok, log: true on success, false on failure and log message.
873
+
874
+
875
+
876
+ </dd>
877
+
878
+
879
+
880
+
881
+ <dt><a name="path"></a><strong>path</strong>&nbsp;(...)</dt>
882
+ <dd>
883
+ Compose full system path or part of url
884
+
885
+
886
+ <h3>Parameters</h3>
887
+ <ul>
888
+
889
+ <li>
890
+ ...:
891
+ </li>
892
+
893
+ </ul>
894
+
895
+
896
+
897
+
898
+
899
+
900
+ <h3>Return value:</h3>
901
+ string: Path string
902
+
903
+
904
+
905
+ </dd>
906
+
907
+
908
+
909
+
910
+ <dt><a name="pathLen"></a><strong>pathLen</strong>&nbsp;(dir)</dt>
911
+ <dd>
912
+ little helper function to get file depth (for directories its +1)
913
+
914
+
915
+ <h3>Parameters</h3>
916
+ <ul>
917
+
918
+ <li>
919
+ dir:
920
+ </li>
921
+
922
+ </ul>
923
+
924
+
925
+
926
+
927
+
928
+
929
+
930
+
931
+ </dd>
932
+
933
+
934
+
935
+
936
+ <dt><a name="relLink"></a><strong>relLink</strong>&nbsp;(src, dest, from)</dt>
937
+ <dd>
938
+ Relatively Link file or directory contents to destination.
939
+
940
+
941
+ <h3>Parameters</h3>
942
+ <ul>
943
+
944
+ <li>
945
+ src: string: Path or file to link.
946
+ </li>
947
+
948
+ <li>
949
+ dest: string: Destination to link to.
950
+ </li>
951
+
952
+ <li>
953
+ from: string: Directory to link from, by default curDir.
954
+ </li>
955
+
956
+ </ul>
957
+
958
+
959
+
960
+
961
+
962
+
963
+ <h3>Return value:</h3>
964
+ ok, log: true on success, false on failure and log message.
965
+
966
+
967
+
968
+ </dd>
969
+
970
+
971
+
972
+
973
+ <dt><a name="unzip"></a><strong>unzip</strong>&nbsp;(archive, dest)</dt>
974
+ <dd>
975
+ Unpack an archive. Extract the contents of an archive, detecting its format by filename extension.
976
+
977
+
978
+ <h3>Parameters</h3>
979
+ <ul>
980
+
981
+ <li>
982
+ archive: string: Filename of archive.
983
+ </li>
984
+
985
+ <li>
986
+ dest:
987
+ </li>
988
+
989
+ </ul>
990
+
991
+
992
+
993
+
994
+
995
+
996
+ <h3>Return value:</h3>
997
+ ok, log: true on success, false on failure and log message.
998
+
999
+
1000
+
1001
+ </dd>
1002
+
1003
+
1004
+
1005
+
1006
+ <dt><a name="zip"></a><strong>zip</strong>&nbsp;(workdir, zipfile, ...)</dt>
1007
+ <dd>
1008
+ Compress files in a .zip archive.
1009
+
1010
+
1011
+ <h3>Parameters</h3>
1012
+ <ul>
1013
+
1014
+ <li>
1015
+ workdir:
1016
+ </li>
1017
+
1018
+ <li>
1019
+ zipfile: string: pathname of .zip archive to be created.
1020
+ </li>
1021
+
1022
+ <li>
1023
+ ...: Filenames to be stored in the archive are given as additional arguments.
1024
+ </li>
1025
+
1026
+ </ul>
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+ <h3>Return value:</h3>
1034
+ ok, log: true on success, false on failure and log message.
1035
+
1036
+
1037
+
1038
+ </dd>
1039
+
1040
+
1041
+ </dl>
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </div> <!-- id="content" -->
1049
+
1050
+ </div> <!-- id="main" -->
1051
+
1052
+ <div id="about">
1053
+ <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
1054
+ </div> <!-- id="about" -->
1055
+
1056
+ </div> <!-- id="container" -->
1057
+ </body>
1058
+ </html>