--- a/Filename.st Sat Apr 14 08:07:03 2018 +0200
+++ b/Filename.st Sun Apr 15 07:04:58 2018 +0200
@@ -419,6 +419,34 @@
"Created: / 16-05-2007 / 13:18:34 / cg"
!
+downloadsDirectory
+ "return the downloads directory.
+ Some OperatingSystems do not support this - on those,
+ the documentsDirectory is returned.
+ Notice: services under windows do not have a user/home and therefore
+ no downloads directory."
+
+ |home dir|
+
+ home := self homeDirectory.
+ home isNil ifTrue:[^ nil].
+ #(
+ 'Downloads'
+ 'downloads'
+ 'Download'
+ 'download'
+ ) do:[:eachTry |
+ (dir := home / eachTry) exists ifTrue:[
+ ^ dir
+ ].
+ ].
+ ^ nil
+
+ "
+ Filename downloadsDirectory
+ "
+!
+
findDefaultDirectory
"same as #defaultDirectory for ST80 compatibility"