Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FileDirectory
Last updated at 10:06 am UTC on 7 May 2022
From the class comment:

A FileDirectory represents a folder or directory in the underlying platform's file system. It carries a fully-qualified path name for the directory it represents, and can enumerate the files and directories within that directory.

A FileDirectory can be thought of as a Dictionary whose keys are the local names of files in that directory, and whose values are directory "entries". Each entry is an array of five items:

The times are given in seconds, and can be converted to a time and date via Time>dateAndTimeFromSeconds:. See the comment in lookupEntry:... which provides primitive access to this information.


see also:


 aFileDirectory keysDo: [:key | ...]
 aFileDirectory fileEntries do: [:aDirectoryEntryFile | ...]


 dirName := '/home/he/Documents/pictures/'".
 aFileDirectory := FileDirectory on: dirName.
 modificationDate  := Date year: 2022 month: 5 day: 1.  
 recentlyModifiedFiles := aFileDirectory fileEntries select: [:aDirectoryEntryFile | aDirectoryEntryFile modificationDateAndTime >= modificationDate].