mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-24 20:01:15 +00:00
27 lines
745 B
Smalltalk
27 lines
745 B
Smalltalk
|
| fileManager path files dict |
|
||
|
|
||
|
fileManager := NSFileManager defaultManager.
|
||
|
|
||
|
path := fileManager currentDirectoryPath.
|
||
|
|
||
|
Transcript showLine:( 'Listing of directory: ', path ).
|
||
|
|
||
|
files := fileManager directoryContentsAtPath:path.
|
||
|
|
||
|
files do:
|
||
|
[ :file |
|
||
|
|
||
|
dict := fileManager fileAttributesAtPath: (path / file)
|
||
|
traverseLink:NO.
|
||
|
Transcript showLine:file.
|
||
|
|
||
|
Transcript showLine: (' Type: ', (dict @ NSFileType)).
|
||
|
Transcript showLine: (' Size: ', ((dict @ NSFileSize) stringValue)).
|
||
|
Transcript showLine: (' Date: ', ((dict @ NSFileModificationDate)
|
||
|
description)).
|
||
|
|
||
|
Transcript showLine:''
|
||
|
]
|
||
|
|
||
|
|