mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Note that directory enumeration order is undefined.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28439 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
047e386082
commit
97be67439f
4 changed files with 43 additions and 17 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-08-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileManager.m:
|
||||
* Headers/Foundation/NSFileManager.h:
|
||||
Updated comments/documentation to say that directory enumeration order
|
||||
is undefined.
|
||||
|
||||
2009-08-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/AGSHtml.m: Escape non-ascii characters etc in author.
|
||||
|
|
|
@ -610,7 +610,19 @@ int main (int argc, char *argv[], char **env)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Check that we can retain the connection, release the proxy,
|
||||
* and then regain the proxy from the connection.
|
||||
*/
|
||||
cobj = RETAIN([prx connectionForProxy]);
|
||||
RELEASE(arp);
|
||||
arp = [NSAutoreleasePool new];
|
||||
prx = [cobj rootObject];
|
||||
AUTORELEASE(cobj);
|
||||
#else
|
||||
cobj = [prx connectionForProxy];
|
||||
#endif
|
||||
|
||||
[cobj setDelegate:auth];
|
||||
[cobj setRequestTimeout:180.0];
|
||||
[cobj setReplyTimeout:180.0];
|
||||
|
|
|
@ -225,6 +225,17 @@ typedef uint32_t OSType;
|
|||
- (NSString*) currentDirectoryPath;
|
||||
- (NSArray*) directoryContentsAtPath: (NSString*)path;
|
||||
- (NSString*) displayNameAtPath: (NSString*)path;
|
||||
/**
|
||||
* <p>Returns an enumerator which can be used to return each item with
|
||||
* the directory at path in turn.
|
||||
* </p>
|
||||
* <p>The enumeration is recursive ... following all nested subdirectories.
|
||||
* </p>
|
||||
* <p>The order in which directory contents are enumerated is undefined,
|
||||
* and in the current implementation the natural order of the underlying
|
||||
* filesystem is used.
|
||||
* </p>
|
||||
*/
|
||||
- (NSDirectoryEnumerator*) enumeratorAtPath: (NSString*)path;
|
||||
- (NSDictionary*) fileAttributesAtPath: (NSString*)path
|
||||
traverseLink: (BOOL)flag;
|
||||
|
@ -335,6 +346,19 @@ typedef uint32_t OSType;
|
|||
@end
|
||||
|
||||
|
||||
/**
|
||||
* <p>This is a subclass of <code>NSEnumerator</code> which provides a full
|
||||
* listing of all the files beneath a directory and its subdirectories.
|
||||
* Instances can be obtained through [NSFileManager-enumeratorAtPath:].
|
||||
* </p>
|
||||
*
|
||||
* <p>This implementation is optimized and performance should be comparable
|
||||
* to the speed of standard Unix tools for large directories.</p>
|
||||
*
|
||||
* <p>The order in which directory contents are enumerated is undefined,
|
||||
* and in the current implementation the natural order of the underlying
|
||||
* filesystem is used.</p>
|
||||
*/
|
||||
@interface NSDirectoryEnumerator : NSEnumerator
|
||||
{
|
||||
@private
|
||||
|
|
|
@ -1925,11 +1925,6 @@ static NSStringEncoding defaultEncoding;
|
|||
return [path lastPathComponent];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an enumerator which can be used to return each item with
|
||||
* the directory at path in turn.<br />
|
||||
* The enumeration is recursive ... following all nested subdirectories.
|
||||
*/
|
||||
- (NSDirectoryEnumerator*) enumeratorAtPath: (NSString*)path
|
||||
{
|
||||
return AUTORELEASE([[NSDirectoryEnumerator alloc]
|
||||
|
@ -2081,16 +2076,6 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
#include "GNUstepBase/GSIArray.h"
|
||||
|
||||
|
||||
/**
|
||||
* <p>This is a subclass of <code>NSEnumerator</code> which provides a full
|
||||
* listing of all the files beneath a directory and its subdirectories.
|
||||
* Instances can be obtained through [NSFileManager-enumeratorAtPath:],
|
||||
* or through an initializer in this class. (For compatibility with OS X,
|
||||
* use the <code>NSFileManager</code> method.)</p>
|
||||
*
|
||||
* <p>This implementation is optimized and performance should be comparable
|
||||
* to the speed of standard Unix tools for large directories.</p>
|
||||
*/
|
||||
@implementation NSDirectoryEnumerator
|
||||
/*
|
||||
* The Objective-C interface hides a traditional C implementation.
|
||||
|
@ -2105,8 +2090,6 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
}
|
||||
}
|
||||
|
||||
// Initializing
|
||||
|
||||
/**
|
||||
* Initialize instance to enumerate contents at path, which should be a
|
||||
* directory and can be specified in relative or absolute, and may include
|
||||
|
|
Loading…
Reference in a new issue