1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
|
/* Generated by Nim Compiler v2.2.0 */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w;
typedef struct tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q;
typedef struct tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ tySequence__S89cE01OvNjsN9c71FKsSrqQ;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ;
typedef struct tyObject_FILETIME__Meeq39cIrx4bjJVTNbXXQxg tyObject_FILETIME__Meeq39cIrx4bjJVTNbXXQxg;
typedef struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA;
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
struct tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w {
NI bytes;
NI16* data;
};
typedef N_STDCALL_PTR(NI32, tyProc__uBkkHOkdpyfFusi9cbg9cHww) (NI16* pathName_p0, void* security_p1);
typedef NI16 tyUncheckedArray__Tyd4y3haUOOHTj71TPIRag[1];
typedef N_STDCALL_PTR(NI32, tyProc__9bXer9a4ps9aSGctILcxWReVw) (void);
struct TNimTypeV2 {
void* destructor;
NI size;
NI16 align;
NI16 depth;
NU32* display;
void* traceImpl;
void* typeInfoV1;
NI flags;
void* vTable[SEQ_DECL_SIZE];
};
struct RootObj {
TNimTypeV2* m_type;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ {
NI len; tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content* p;
};
struct Exception {
RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringV2 message;
tySequence__S89cE01OvNjsN9c71FKsSrqQ trace;
Exception* up;
};
struct tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg {
Exception Sup;
};
struct tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q {
tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg Sup;
};
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
NimStringV2 Field0;
NimStringV2 Field1;
};
typedef NU8 tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ;
struct tyObject_FILETIME__Meeq39cIrx4bjJVTNbXXQxg {
NI32 dwLowDateTime;
NI32 dwHighDateTime;
};
typedef NI16 tyArray__EKfNt9b8uxndgFbu2Ky3XAQ[260];
typedef NI16 tyArray__Get9cpRTS5VjGKP6CDsI9bYA[14];
struct tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ {
NI32 dwFileAttributes;
tyObject_FILETIME__Meeq39cIrx4bjJVTNbXXQxg ftCreationTime;
tyObject_FILETIME__Meeq39cIrx4bjJVTNbXXQxg ftLastAccessTime;
tyObject_FILETIME__Meeq39cIrx4bjJVTNbXXQxg ftLastWriteTime;
NI32 nFileSizeHigh;
NI32 nFileSizeLow;
NI32 dwReserved0;
NI32 dwReserved1;
tyArray__EKfNt9b8uxndgFbu2Ky3XAQ cFileName;
tyArray__Get9cpRTS5VjGKP6CDsI9bYA cAlternateFileName;
};
typedef N_STDCALL_PTR(NI32, tyProc__jG85NyrZ9ayUwtzbNvd5JMQ) (NI hFindFile_p0, tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ* lpFindFileData_p1);
typedef N_STDCALL_PTR(void, tyProc__ofoySXaAAlxxs9bQS9a1etlg) (NI hFindFile_p0);
typedef N_STDCALL_PTR(NI32, tyProc__5sqIMptsyAfPn3c9cPj4DOA) (NI16* lpPathName_p0);
typedef NU8 tySet_tyEnum_CopyFlag__1j5oUmplkZXgil3SrVhR7g;
struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA {
NCSTRING procname;
NI line;
NCSTRING filename;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content { NI cap; tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosisAbsolute)(NimStringV2 path_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2600)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosexistsOrCreateDir)(NimStringV2 dir_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, rawCreateDir__stdZprivateZosdirs_u459)(NimStringV2 dir_p0);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(NI16*, toWideCString__stdZwidestrs_u49)(tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w x_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w, newWideCString__stdZwidestrs_u316)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__stdZoserrors_u123)(NI32 errorCode_p0, NimStringV2 additionalInfo_p1);
N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__stdZoserrors_u126)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZwidestrs_u7)(tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w a_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosdirExists)(NimStringV2 dir_p0);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, copyMem__system_u1713)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space_p0);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosisRootDir)(NimStringV2 path_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, eqdup___system_u2603)(NimStringV2 src_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2606)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nosparentDir)(NimStringV2 path_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u2597)(NimStringV2 dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, splitDrive__stdZprivateZntpath_u2)(NimStringV2 p_p0, tyTuple__UV3llMMYFckfui8YMBuUZA* Result);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u8435)(NimStringV2 s_p0, NI first_p1, NI last_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZprivateZntpath_u119)(tyTuple__UV3llMMYFckfui8YMBuUZA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(NI, findFirstFile__stdZprivateZoscommon_u25)(NimStringV2 a_p0, tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ* b_p1);
static N_INLINE(NimStringV2, slash___stdZprivateZospaths2_u90)(NimStringV2 head_p0, NimStringV2 tail_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nosjoinPath)(NimStringV2 head_p0, NimStringV2 tail_p1);
static N_INLINE(NIM_BOOL, skipFindData__stdZprivateZoscommon_u34)(tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ* f_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nosextractFilename)(NimStringV2 path_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___stdZwidestrs_u385)(NI16* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2594)(NimStringV2* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nosremoveFile)(NimStringV2 file_p0);
N_LIB_PRIVATE N_NIMCALL(void, nosremoveDir)(NimStringV2 dir_p0, NIM_BOOL checkDir_p1);
N_LIB_PRIVATE N_NIMCALL(void, rawRemoveDir__stdZprivateZosdirs_u450)(NimStringV2 dir_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, tryMoveFSObject__stdZprivateZoscommon_u68)(NimStringV2 source_p0, NimStringV2 dest_p1, NIM_BOOL isDir_p2);
N_LIB_PRIVATE N_NIMCALL(void, noscopyDir)(NimStringV2 source_p0, NimStringV2 dest_p1, NIM_BOOL skipSpecial_p2);
N_LIB_PRIVATE N_NIMCALL(void, noscreateDir)(NimStringV2 dir_p0);
N_LIB_PRIVATE N_NIMCALL(void, nossplitPath)(NimStringV2 path_p0, tyTuple__UV3llMMYFckfui8YMBuUZA* Result);
N_LIB_PRIVATE N_NIMCALL(void, noscopyFile)(NimStringV2 source_p0, NimStringV2 dest_p1, tySet_tyEnum_CopyFlag__1j5oUmplkZXgil3SrVhR7g options_p2, NI bufferSize_p3);
extern TNimTypeV2 NTIv2__vBePDvr8fj01uTfaJy9aD3Q_;
static const struct {
NI cap; NIM_CHAR data[18+1];
} TM__UhMx4BhJKblm8VrPrbmAGA_2 = { 18 | NIM_STRLIT_FLAG, "Failed to create \'" };
static const NimStringV2 TM__UhMx4BhJKblm8VrPrbmAGA_3 = {18, (NimStrPayload*)&TM__UhMx4BhJKblm8VrPrbmAGA_2};
static const struct {
NI cap; NIM_CHAR data[1+1];
} TM__UhMx4BhJKblm8VrPrbmAGA_4 = { 1 | NIM_STRLIT_FLAG, "\'" };
static const NimStringV2 TM__UhMx4BhJKblm8VrPrbmAGA_5 = {1, (NimStrPayload*)&TM__UhMx4BhJKblm8VrPrbmAGA_4};
static const struct {
NI cap; NIM_CHAR data[1+1];
} TM__UhMx4BhJKblm8VrPrbmAGA_6 = { 1 | NIM_STRLIT_FLAG, "*" };
static const NimStringV2 TM__UhMx4BhJKblm8VrPrbmAGA_7 = {1, (NimStrPayload*)&TM__UhMx4BhJKblm8VrPrbmAGA_6};
static const struct {
NI cap; NIM_CHAR data[0+1];
} TM__UhMx4BhJKblm8VrPrbmAGA_8 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__UhMx4BhJKblm8VrPrbmAGA_9 = {0, (NimStrPayload*)&TM__UhMx4BhJKblm8VrPrbmAGA_8};
static const NimStringV2 TM__UhMx4BhJKblm8VrPrbmAGA_10 = {1, (NimStrPayload*)&TM__UhMx4BhJKblm8VrPrbmAGA_6};
static const NimStringV2 TM__UhMx4BhJKblm8VrPrbmAGA_11 = {0, (NimStrPayload*)&TM__UhMx4BhJKblm8VrPrbmAGA_8};
extern NIM_BOOL nimInErrorMode__system_u4274;
extern tyProc__uBkkHOkdpyfFusi9cbg9cHww Dl_1426063549_;
extern tyProc__9bXer9a4ps9aSGctILcxWReVw Dl_1426063531_;
extern tyProc__jG85NyrZ9ayUwtzbNvd5JMQ Dl_1426063614_;
extern tyProc__ofoySXaAAlxxs9bQS9a1etlg Dl_1426063617_;
extern tyProc__5sqIMptsyAfPn3c9cPj4DOA Dl_1426063552_;
static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2) {
void* T1_;
T1_ = (void*)0;
T1_ = memset(a_p0, v_p1, ((size_t) (size_p2)));
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4274);
return result;
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
nimSetMem__systemZmemory_u7(p_p0, ((int)0), size_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
static N_INLINE(NI16*, toWideCString__stdZwidestrs_u49)(tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w x_p0) {
NI16* result;
result = x_p0.data;
return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, rawCreateDir__stdZprivateZosdirs_u459)(NimStringV2 dir_p0) {
NIM_BOOL result;
tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w colontmpD_;
NI32 res;
NI16* T2_;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
nimZeroMem((void*)(&colontmpD_), sizeof(tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w));
colontmpD_ = newWideCString__stdZwidestrs_u316(dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_ = (NI16*)0;
T2_ = toWideCString__stdZwidestrs_u49(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
res = Dl_1426063549_(T2_, NIM_NIL);
{
if (!!((res == ((NI32)0)))) goto LA5_;
result = NIM_TRUE;
}
goto LA3_;
LA5_: ;
{
NI32 T8_;
T8_ = (NI32)0;
T8_ = Dl_1426063531_();
if (!(T8_ == ((NI32)183))) goto LA9_;
result = NIM_FALSE;
}
goto LA3_;
LA9_: ;
{
NI32 T12_;
T12_ = (NI32)0;
T12_ = osLastError__stdZoserrors_u126();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
raiseOSError__stdZoserrors_u123(T12_, dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA3_: ;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___stdZwidestrs_u7(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
return result;
}
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2) {
void* T1_;
T1_ = (void*)0;
T1_ = memcpy(dest_p0, source_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, copyMem__system_u1713)(void* dest_p0, void* source_p1, NI size_p2) {
nimCopyMem(dest_p0, source_p1, size_p2);
}
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1) {
{
if (!(((NI)0) < src_p1.len)) goto LA3_;
copyMem__system_u1713(((void*) ((&(*(*dest_p0).p).data[(*dest_p0).len]))), ((void*) ((&(*src_p1.p).data[((NI)0)]))), ((NI)(src_p1.len + ((NI)1))));
(*dest_p0).len += src_p1.len;
}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosexistsOrCreateDir)(NimStringV2 dir_p0) {
NIM_BOOL result;
NIM_BOOL T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
result = (NIM_BOOL)0;
T1_ = (NIM_BOOL)0;
T1_ = rawCreateDir__stdZprivateZosdirs_u459(dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
result = !(T1_);
{
if (!result) goto LA4_;
{
NIM_BOOL T8_;
tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q* T11_;
NimStringV2 T12_;
T8_ = (NIM_BOOL)0;
T8_ = nosdirExists(dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!(T8_)) goto LA9_;
T11_ = NIM_NIL;
T11_ = (tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q*) nimNewObj(sizeof(tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q), NIM_ALIGNOF(tyObject_IOError__vBePDvr8fj01uTfaJy9aD3Q));
(*T11_).Sup.Sup.Sup.m_type = (&NTIv2__vBePDvr8fj01uTfaJy9aD3Q_);
(*T11_).Sup.Sup.name = "IOError";
T12_.len = 0; T12_.p = NIM_NIL;
T12_ = rawNewString(dir_p0.len + 19);
appendString((&T12_), TM__UhMx4BhJKblm8VrPrbmAGA_3);
appendString((&T12_), dir_p0);
appendString((&T12_), TM__UhMx4BhJKblm8VrPrbmAGA_5);
(*T11_).Sup.Sup.message = T12_;
(*T11_).Sup.Sup.parent = ((Exception*) NIM_NIL);
raiseExceptionEx((Exception*)T11_, "IOError", "existsOrCreateDir", "osdirs.nim", 422);
goto BeforeRet_;
}
LA9_: ;
}
LA4_: ;
}BeforeRet_: ;
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, noscreateDir)(NimStringV2 dir_p0) {
NIM_BOOL omitNext;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
if (!(dir_p0.len == 0)) goto LA3_;
goto BeforeRet_;
}
LA3_: ;
omitNext = nosisAbsolute(dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NimStringV2 p;
p.len = 0; p.p = NIM_NIL;
{
NimStringV2 current;
if (!NIM_FALSE) goto LA9_;
current.len = 0; current.p = NIM_NIL;
eqcopy___system_u2600((¤t), dir_p0);
{
if (!NIM_TRUE) goto LA14_;
eqcopy___system_u2600((&p), dir_p0);
{
if (!omitNext) goto LA18_;
omitNext = NIM_FALSE;
}
goto LA16_;
LA18_: ;
{
NIM_BOOL T21_;
T21_ = (NIM_BOOL)0;
T21_ = nosexistsOrCreateDir(p);
if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
(void)(T21_);
}
LA16_: ;
}
LA14_: ;
{
while (1) {
NimStringV2 colontmpD_;
NimStringV2 T29_;
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
{
NIM_BOOL T26_;
colontmpD_ = eqdup___system_u2603(current);
T26_ = (NIM_BOOL)0;
T26_ = nosisRootDir(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
if (!T26_) goto LA27_;
goto LA22;
}
LA27_: ;
T29_.len = 0; T29_.p = NIM_NIL;
T29_ = nosparentDir(current);
if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u2597(T29_); goto LA11_;}
eqsink___system_u2606((¤t), T29_);
eqcopy___system_u2600((&p), current);
{
if (!omitNext) goto LA32_;
omitNext = NIM_FALSE;
}
goto LA30_;
LA32_: ;
{
NIM_BOOL T35_;
T35_ = (NIM_BOOL)0;
T35_ = nosexistsOrCreateDir(p);
if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
(void)(T35_);
}
LA30_: ;
}
} LA22: ;
{
LA11_:;
}
{
eqdestroy___system_u2597(current);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA6_;
}
goto LA7_;
LA9_: ;
{
NimStringV2 colontmpD__2;
tyTuple__UV3llMMYFckfui8YMBuUZA colontmpD__3;
NI start;
colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
nimZeroMem((void*)(&colontmpD__3), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
colontmpD__2 = eqdup___system_u2603(dir_p0);
splitDrive__stdZprivateZntpath_u2(colontmpD__2, (&colontmpD__3));
if (NIM_UNLIKELY(*nimErr_)) goto LA39_;
start = colontmpD__3.Field0.len;
{
NI i;
NI colontmp_;
NI res;
i = (NI)0;
colontmp_ = (NI)0;
colontmp_ = (NI)(dir_p0.len - ((NI)2));
res = start;
{
while (1) {
if (!(res <= colontmp_)) goto LA42;
i = ((NI) (res));
{
NIM_BOOL T45_;
NIM_BOOL T47_;
NimStringV2 T51_;
T45_ = (NIM_BOOL)0;
T45_ = (((NU8)(dir_p0.p->data[i])) == ((NU8)(92)) || ((NU8)(dir_p0.p->data[i])) == ((NU8)(47)));
if (!(T45_)) goto LA46_;
T47_ = (NIM_BOOL)0;
T47_ = (i == ((NI)0));
if (T47_) goto LA48_;
T47_ = !((((NU8)(dir_p0.p->data[(NI)(i - ((NI)1))])) == ((NU8)(92)) || ((NU8)(dir_p0.p->data[(NI)(i - ((NI)1))])) == ((NU8)(47))));
LA48_: ;
T45_ = T47_;
LA46_: ;
if (!T45_) goto LA49_;
T51_.len = 0; T51_.p = NIM_NIL;
T51_ = substr__system_u8435(dir_p0, ((NI)0), i);
eqsink___system_u2606((&p), T51_);
{
if (!omitNext) goto LA54_;
omitNext = NIM_FALSE;
}
goto LA52_;
LA54_: ;
{
NIM_BOOL T57_;
T57_ = (NIM_BOOL)0;
T57_ = nosexistsOrCreateDir(p);
if (NIM_UNLIKELY(*nimErr_)) goto LA39_;
(void)(T57_);
}
LA52_: ;
}
LA49_: ;
res += ((NI)1);
} LA42: ;
}
}
{
if (!NIM_TRUE) goto LA60_;
eqcopy___system_u2600((&p), dir_p0);
{
if (!omitNext) goto LA64_;
omitNext = NIM_FALSE;
}
goto LA62_;
LA64_: ;
{
NIM_BOOL T67_;
T67_ = (NIM_BOOL)0;
T67_ = nosexistsOrCreateDir(p);
if (NIM_UNLIKELY(*nimErr_)) goto LA39_;
(void)(T67_);
}
LA62_: ;
}
LA60_: ;
{
LA39_:;
}
{
eqdestroy___stdZprivateZntpath_u119((&colontmpD__3));
}
if (NIM_UNLIKELY(*nimErr_)) goto LA6_;
}
LA7_: ;
{
LA6_:;
}
{
eqdestroy___system_u2597(p);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
}BeforeRet_: ;
}
static N_INLINE(NimStringV2, slash___stdZprivateZospaths2_u90)(NimStringV2 head_p0, NimStringV2 tail_p1) {
NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
result.len = 0; result.p = NIM_NIL;
result = nosjoinPath(head_p0, tail_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
return result;
}
static N_INLINE(NIM_BOOL, skipFindData__stdZprivateZoscommon_u34)(tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ* f_p0) {
NIM_BOOL result;
NIM_BOOL T1_;
NIM_BOOL T3_;
NIM_BOOL T5_;
T1_ = (NIM_BOOL)0;
T1_ = (((NI) ((*f_p0).cFileName[(((NI)0))- 0])) == ((NI)46));
if (!(T1_)) goto LA2_;
T3_ = (NIM_BOOL)0;
T3_ = (((NI) ((*f_p0).cFileName[(((NI)1))- 0])) == ((NI)0));
if (T3_) goto LA4_;
T5_ = (NIM_BOOL)0;
T5_ = (((NI) ((*f_p0).cFileName[(((NI)1))- 0])) == ((NI)46));
if (!(T5_)) goto LA6_;
T5_ = (((NI) ((*f_p0).cFileName[(((NI)2))- 0])) == ((NI)0));
LA6_: ;
T3_ = T5_;
LA4_: ;
T1_ = T3_;
LA2_: ;
result = T1_;
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, rawRemoveDir__stdZprivateZosdirs_u450)(NimStringV2 dir_p0) {
tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w colontmpD_;
NI32 res;
NI16* T2_;
NI32 lastError;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
nimZeroMem((void*)(&colontmpD_), sizeof(tyObject_WideCStringObj__S69bIyvbp2ySa2Didg6Np7w));
colontmpD_ = newWideCString__stdZwidestrs_u316(dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_ = (NI16*)0;
T2_ = toWideCString__stdZwidestrs_u49(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
res = Dl_1426063552_(T2_);
lastError = osLastError__stdZoserrors_u126();
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
{
NIM_BOOL T5_;
NIM_BOOL T6_;
NIM_BOOL T7_;
T5_ = (NIM_BOOL)0;
T6_ = (NIM_BOOL)0;
T7_ = (NIM_BOOL)0;
T7_ = (res == ((NI32)0));
if (!(T7_)) goto LA8_;
T7_ = !((lastError == ((NI32)3)));
LA8_: ;
T6_ = T7_;
if (!(T6_)) goto LA9_;
T6_ = !((lastError == ((NI32)18)));
LA9_: ;
T5_ = T6_;
if (!(T5_)) goto LA10_;
T5_ = !((lastError == ((NI32)2)));
LA10_: ;
if (!T5_) goto LA11_;
raiseOSError__stdZoserrors_u123(lastError, dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
}
LA11_: ;
{
LA1_:;
}
{
oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
eqdestroy___stdZwidestrs_u7(colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
*nimErr_ = oldNimErrFin1_;
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, nosremoveDir)(NimStringV2 dir_p0, NIM_BOOL checkDir_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NimStringV2 path;
NimStringV2 colontmpD_;
tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ kind;
tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ f;
NI h;
path.len = 0; path.p = NIM_NIL;
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
kind = (tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)0;
nimZeroMem((void*)(&f), sizeof(tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ));
colontmpD_ = slash___stdZprivateZospaths2_u90(dir_p0, TM__UhMx4BhJKblm8VrPrbmAGA_7);
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
h = findFirstFile__stdZprivateZoscommon_u25(colontmpD_, (&f));
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
{
if (!(h == ((NI)-1))) goto LA5_;
{
NI32 T11_;
if (!checkDir_p1) goto LA9_;
T11_ = (NI32)0;
T11_ = osLastError__stdZoserrors_u126();
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
raiseOSError__stdZoserrors_u123(T11_, dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
}
LA9_: ;
}
goto LA3_;
LA5_: ;
{
{
while (1) {
tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ k;
k = ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)0);
{
NIM_BOOL T18_;
NimStringV2 xx;
NimStringV2 T30_;
T18_ = (NIM_BOOL)0;
T18_ = skipFindData__stdZprivateZoscommon_u34((&f));
if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
if (!!(T18_)) goto LA19_;
xx.len = 0; xx.p = NIM_NIL;
{
if (!!(((NI32)(f.dwFileAttributes & ((NI32)16)) == ((NI32)0)))) goto LA24_;
k = ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)2);
}
LA24_: ;
{
if (!!(((NI32)(f.dwFileAttributes & ((NI32)1024)) == ((NI32)0)))) goto LA28_;
k = (tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)(k + ((NI)1));
}
LA28_: ;
T30_.len = 0; T30_.p = NIM_NIL;
{
NimStringV2 colontmpD__2;
if (!NIM_FALSE) goto LA33_;
colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
colontmpD__2 = dollar___stdZwidestrs_u385(((NI16*) ((&f.cFileName[(((NI)0))- 0]))));
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
xx = nosextractFilename(colontmpD__2);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
eqdestroy___system_u2597(colontmpD__2);
}
goto LA31_;
LA33_: ;
{
NimStringV2 colontmpD__3;
NimStringV2 colontmpD__4;
colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
colontmpD__3 = dollar___stdZwidestrs_u385(((NI16*) ((&f.cFileName[(((NI)0))- 0]))));
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
colontmpD__4 = nosextractFilename(colontmpD__3);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
xx = slash___stdZprivateZospaths2_u90(dir_p0, colontmpD__4);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
eqdestroy___system_u2597(colontmpD__4);
eqdestroy___system_u2597(colontmpD__3);
}
LA31_: ;
kind = k;
eqsink___system_u2606((&path), xx);
eqwasMoved___system_u2594((&xx));
switch (kind) {
case ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)0):
case ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)1):
case ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)3):
{
nosremoveFile(path);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
}
break;
case ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)2):
{
nosremoveDir(path, NIM_TRUE);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
}
break;
default: __builtin_unreachable();
}
{
LA21_:;
}
{
eqdestroy___system_u2597(xx);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
}
LA19_: ;
{
NI32 T42_;
NI32 errCode;
T42_ = (NI32)0;
T42_ = Dl_1426063614_(h, (&f));
if (!(T42_ == ((NI32)0))) goto LA43_;
errCode = Dl_1426063531_();
{
if (!(errCode == ((NI32)18))) goto LA47_;
goto LA14;
}
goto LA45_;
LA47_: ;
{
raiseOSError__stdZoserrors_u123(errCode, TM__UhMx4BhJKblm8VrPrbmAGA_9);
if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
}
LA45_: ;
}
LA43_: ;
}
} LA14: ;
{
LA13_:;
}
{
Dl_1426063617_(h);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
}
LA3_: ;
{
LA2_:;
}
{
eqdestroy___system_u2597(colontmpD_);
eqdestroy___system_u2597(path);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
rawRemoveDir__stdZprivateZosdirs_u450(dir_p0);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, noscopyDir)(NimStringV2 source_p0, NimStringV2 dest_p1, NIM_BOOL skipSpecial_p2) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
noscreateDir(dest_p1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
{
NimStringV2 path;
NimStringV2 colontmpD_;
tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ kind;
tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ f;
NI h;
path.len = 0; path.p = NIM_NIL;
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
kind = (tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)0;
nimZeroMem((void*)(&f), sizeof(tyObject_WIN32_FIND_DATA__5ZnB2Z0FCjJIB0LNM9aQVwQ));
colontmpD_ = slash___stdZprivateZospaths2_u90(source_p0, TM__UhMx4BhJKblm8VrPrbmAGA_10);
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
h = findFirstFile__stdZprivateZoscommon_u25(colontmpD_, (&f));
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
{
if (!(h == ((NI)-1))) goto LA5_;
{
NI32 T11_;
if (!NIM_FALSE) goto LA9_;
T11_ = (NI32)0;
T11_ = osLastError__stdZoserrors_u126();
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
raiseOSError__stdZoserrors_u123(T11_, source_p0);
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
}
LA9_: ;
}
goto LA3_;
LA5_: ;
{
{
while (1) {
tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ k;
k = ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)0);
{
NIM_BOOL T18_;
NimStringV2 xx;
NimStringV2 noSource;
NimStringV2 colontmpD__2;
tyTuple__UV3llMMYFckfui8YMBuUZA colontmpD__3;
NimStringV2 T30_;
T18_ = (NIM_BOOL)0;
T18_ = skipFindData__stdZprivateZoscommon_u34((&f));
if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
if (!!(T18_)) goto LA19_;
xx.len = 0; xx.p = NIM_NIL;
noSource.len = 0; noSource.p = NIM_NIL;
colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
nimZeroMem((void*)(&colontmpD__3), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
{
if (!!(((NI32)(f.dwFileAttributes & ((NI32)16)) == ((NI32)0)))) goto LA24_;
k = ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)2);
}
LA24_: ;
{
if (!!(((NI32)(f.dwFileAttributes & ((NI32)1024)) == ((NI32)0)))) goto LA28_;
k = (tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)(k + ((NI)1));
}
LA28_: ;
T30_.len = 0; T30_.p = NIM_NIL;
{
NimStringV2 colontmpD__4;
if (!NIM_FALSE) goto LA33_;
colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
colontmpD__4 = dollar___stdZwidestrs_u385(((NI16*) ((&f.cFileName[(((NI)0))- 0]))));
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
xx = nosextractFilename(colontmpD__4);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
eqdestroy___system_u2597(colontmpD__4);
}
goto LA31_;
LA33_: ;
{
NimStringV2 colontmpD__5;
NimStringV2 colontmpD__6;
colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
colontmpD__5 = dollar___stdZwidestrs_u385(((NI16*) ((&f.cFileName[(((NI)0))- 0]))));
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
colontmpD__6 = nosextractFilename(colontmpD__5);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
xx = slash___stdZprivateZospaths2_u90(source_p0, colontmpD__6);
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
eqdestroy___system_u2597(colontmpD__6);
eqdestroy___system_u2597(colontmpD__5);
}
LA31_: ;
kind = k;
eqsink___system_u2606((&path), xx);
eqwasMoved___system_u2594((&xx));
colontmpD__2 = eqdup___system_u2603(path);
nossplitPath(colontmpD__2, (&colontmpD__3));
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
eqcopy___system_u2600((&noSource), colontmpD__3.Field1);
{
NimStringV2 colontmpD__7;
if (!(kind == ((tyEnum_PathComponent__i8fM5ZocsqRz0g9ccV33pvQ)2))) goto LA38_;
colontmpD__7.len = 0; colontmpD__7.p = NIM_NIL;
colontmpD__7 = slash___stdZprivateZospaths2_u90(dest_p1, noSource);
if (NIM_UNLIKELY(*nimErr_)) goto LA40_;
noscopyDir(path, colontmpD__7, skipSpecial_p2);
if (NIM_UNLIKELY(*nimErr_)) goto LA40_;
{
LA40_:;
}
{
eqdestroy___system_u2597(colontmpD__7);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
}
goto LA36_;
LA38_: ;
{
NimStringV2 colontmpD__8;
colontmpD__8.len = 0; colontmpD__8.p = NIM_NIL;
colontmpD__8 = slash___stdZprivateZospaths2_u90(dest_p1, noSource);
if (NIM_UNLIKELY(*nimErr_)) goto LA44_;
noscopyFile(path, colontmpD__8, 1, ((NI)16384));
if (NIM_UNLIKELY(*nimErr_)) goto LA44_;
{
LA44_:;
}
{
eqdestroy___system_u2597(colontmpD__8);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
}
LA36_: ;
{
LA21_:;
}
{
eqdestroy___stdZprivateZntpath_u119((&colontmpD__3));
eqdestroy___system_u2597(noSource);
eqdestroy___system_u2597(xx);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
}
LA19_: ;
{
NI32 T51_;
NI32 errCode;
T51_ = (NI32)0;
T51_ = Dl_1426063614_(h, (&f));
if (!(T51_ == ((NI32)0))) goto LA52_;
errCode = Dl_1426063531_();
{
if (!(errCode == ((NI32)18))) goto LA56_;
goto LA14;
}
goto LA54_;
LA56_: ;
{
raiseOSError__stdZoserrors_u123(errCode, TM__UhMx4BhJKblm8VrPrbmAGA_11);
if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
}
LA54_: ;
}
LA52_: ;
}
} LA14: ;
{
LA13_:;
}
{
Dl_1426063617_(h);
}
if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
}
LA3_: ;
{
LA2_:;
}
{
eqdestroy___system_u2597(colontmpD_);
eqdestroy___system_u2597(path);
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, moveDir__stdZprivateZosdirs_u495)(NimStringV2 source_p0, NimStringV2 dest_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = tryMoveFSObject__stdZprivateZoscommon_u68(source_p0, dest_p1, NIM_TRUE);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
if (!!(T3_)) goto LA4_;
noscopyDir(source_p0, dest_p1, NIM_FALSE);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
nosremoveDir(source_p0, NIM_FALSE);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
}
LA4_: ;
}BeforeRet_: ;
}
|