Skip to content

Commit

Permalink
add debug when dir not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey committed Feb 6, 2025
1 parent 34d6e2c commit def16c7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/PharoLauncher-Tests-Functional/FileReference.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Extension { #name : 'FileReference' }

{ #category : '*PharoLauncher-Tests-Functional' }
FileReference >> delete [
"Deletes the referenced file or directory. If the directory is not empty,
raises an error. Use #deleteAll to delete with the children."

(self isDirectory and:
[ self isSymlink not and:
[ self hasChildren ] ])
ifTrue:[
Smalltalk logStdErrorDuring: [ :stderr |
stderr nextPutAll: 'children:'; cr.
self children do: [ :child | stderr nextPutAll: ' - '; nextPutAll: child asString; cr ]
].
DirectoryIsNotEmpty signalWith: self ].
filesystem delete: path
]

0 comments on commit def16c7

Please sign in to comment.