equal
deleted
inserted
replaced
594 |
594 |
595 ok = false; |
595 ok = false; |
596 if (__INST(dirPointer) == nil) { |
596 if (__INST(dirPointer) == nil) { |
597 path = __INST(pathName); |
597 path = __INST(pathName); |
598 if (__isString(path)) { |
598 if (__isString(path)) { |
599 strcpy(pattern, __stringVal(path)); |
599 int l = __stringSize(path); |
600 strcat(pattern, "\\*"); |
600 |
601 d = FindFirstFile(pattern, &data); |
601 if (l < (sizeof(pattern)-4)) { |
602 if (d == INVALID_HANDLE_VALUE) { |
602 strncpy(pattern, __stringVal(path), l); |
603 __INST(lastErrorNumber) = __MKSMALLINT(GetLastError()); |
603 strcpy(pattern+l, "\\*"); |
604 } else { |
604 d = FindFirstFile(pattern, &data); |
605 __INST(dirPointer) = dp = __MKEXTERNALADDRESS(d); __STORE(self, dp); |
605 if (d == INVALID_HANDLE_VALUE) { |
606 entry = __MKSTRING( data.cFileName ); |
606 __INST(lastErrorNumber) = __MKSMALLINT(GetLastError()); |
607 ok = true; |
607 } else { |
|
608 __INST(dirPointer) = dp = __MKEXTERNALADDRESS(d); __STORE(self, dp); |
|
609 entry = __MKSTRING( data.cFileName ); |
|
610 ok = true; |
|
611 } |
608 } |
612 } |
609 } |
613 } |
610 } |
614 } |
611 # endif |
615 # endif |
612 #endif |
616 #endif |
671 ! ! |
675 ! ! |
672 |
676 |
673 !DirectoryStream class methodsFor:'documentation'! |
677 !DirectoryStream class methodsFor:'documentation'! |
674 |
678 |
675 version |
679 version |
676 ^ '$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.41 1997-10-06 13:27:34 cg Exp $' |
680 ^ '$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.42 1998-01-12 13:21:57 cg Exp $' |
677 ! ! |
681 ! ! |