This commit is contained in:
rfm 2023-11-14 20:55:22 +00:00
parent 41ad571889
commit e8b67e3e0b
3 changed files with 42 additions and 3 deletions

View file

@ -272,6 +272,28 @@ NSLog(@"%@\n%@", oa, na);
PASS([mgr createDirectoryAtPath: @"subdir" attributes: nil],
"NSFileManager can create a subdirectory");
{
NSURL *u;
NSDirectoryEnumerator *e;
unsigned found = 0;
e = [mgr enumeratorAtURL: [NSURL fileURLWithPath: @"."]
includingPropertiesForKeys: nil
options: 0
errorHandler: nil];
while (nil != (u = [e nextObject]))
{
NSString *c = [[u path] lastPathComponent];
if ([c isEqualToString: @"NSFMCopy"])
found++;
if ([c isEqualToString: @"subdir"])
found++;
}
PASS(2 == found, "URL enumerator finds expected file and subdirectory")
}
PASS([mgr changeCurrentDirectoryPath: @"subdir"],
"NSFileManager can move into subdir");