* Get error message for file error code * @param {number} code * @returns {string}
(code)
| 350 | * @returns {string} |
| 351 | */ |
| 352 | function getErrorMessage(code) { |
| 353 | switch (code) { |
| 354 | case 1: |
| 355 | return "Path not found"; |
| 356 | case 2: |
| 357 | return "Security error"; |
| 358 | case 3: |
| 359 | return "Action aborted"; |
| 360 | case 4: |
| 361 | return "File not readable"; |
| 362 | case 5: |
| 363 | return "File encoding error"; |
| 364 | case 6: |
| 365 | return "Modification not allowed"; |
| 366 | case 7: |
| 367 | return "Invalid state"; |
| 368 | case 8: |
| 369 | return "Syntax error"; |
| 370 | case 9: |
| 371 | return "Invalid modification"; |
| 372 | case 10: |
| 373 | return "Quota exceeded"; |
| 374 | case 11: |
| 375 | return "Type mismatch"; |
| 376 | case 12: |
| 377 | return "Path already exists"; |
| 378 | default: |
| 379 | return "Uncaught error"; |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * Initialize file system |