File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
src/test/php/com/amazon/aws/lambda/unittest Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,6 @@ private function tempDir(): Folder {
1919 return $ f ;
2020 }
2121
22- /** @return void */
23- private function removeDir (Folder $ folder ) {
24- foreach ($ folder ->entries () as $ entry ) {
25- switch ($ m = lstat ($ entry )['mode ' ] & 0170000 ) {
26- case Sources::IS_LINK : unlink ($ entry ); break ;
27- case Sources::IS_FILE : $ entry ->asFile ()->unlink (); break ;
28- case Sources::IS_FOLDER : $ this ->removeDir ($ entry ->asFolder ()); break ;
29- }
30- }
31- }
32-
3322 /** Creates files and directory from given definitions */
3423 private function create (array $ definitions , Folder $ folder = null ): Path {
3524 $ folder ?? $ folder = $ this ->tempDir ();
@@ -75,7 +64,7 @@ private function package(Sources $sources): ZipIterator {
7564 #[After]
7665 private function cleanup () {
7766 foreach ($ this ->cleanup as $ folder ) {
78- $ this -> removeDir ( $ folder );
67+ $ folder -> unlink ( );
7968 }
8069 }
8170
You can’t perform that action at this time.
0 commit comments