@@ -137,35 +137,35 @@ public function open(string|\Stringable $uri): void
137137 $ this ->dispatch (new UriOpened ($ this ->app , $ uri ));
138138 }
139139
140- public function selectDirectory (?string $ path = null , iterable $ filter = []): ?string
140+ public function selectDirectory (?string $ directory = null , iterable $ filter = []): ?string
141141 {
142- if (!$ this ->intent (new DirectorySelecting ($ this ->app , $ path , $ filter ))) {
142+ if (!$ this ->intent (new DirectorySelecting ($ this ->app , $ directory , $ filter ))) {
143143 return null ;
144144 }
145145
146146 $ filter = \iterator_to_array ($ filter , false );
147147
148- $ result = $ this ->selectOne ($ path , $ filter , $ this ->app ->saucer ->saucer_picker_pick_folder (...));
148+ $ result = $ this ->selectOne ($ directory , $ filter , $ this ->app ->saucer ->saucer_picker_pick_folder (...));
149149
150150 if ($ result !== null ) {
151- $ this ->dispatch (new DirectorySelected ($ this ->app , $ result , $ path , $ filter ));
151+ $ this ->dispatch (new DirectorySelected ($ this ->app , $ result , $ directory , $ filter ));
152152 }
153153
154154 return $ result ;
155155 }
156156
157- public function selectFile (?string $ path = null , iterable $ filter = []): ?string
157+ public function selectFile (?string $ directory = null , iterable $ filter = []): ?string
158158 {
159- if (!$ this ->intent (new FileSelecting ($ this ->app , $ path , $ filter ))) {
159+ if (!$ this ->intent (new FileSelecting ($ this ->app , $ directory , $ filter ))) {
160160 return null ;
161161 }
162162
163163 $ filter = \iterator_to_array ($ filter , false );
164164
165- $ result = $ this ->selectOne ($ path , $ filter , $ this ->app ->saucer ->saucer_picker_pick_file (...));
165+ $ result = $ this ->selectOne ($ directory , $ filter , $ this ->app ->saucer ->saucer_picker_pick_file (...));
166166
167167 if ($ result !== null ) {
168- $ this ->dispatch (new FileSelected ($ this ->app , $ result , $ path , $ filter ));
168+ $ this ->dispatch (new FileSelected ($ this ->app , $ result , $ directory , $ filter ));
169169 }
170170
171171 return $ result ;
@@ -174,18 +174,18 @@ public function selectFile(?string $path = null, iterable $filter = []): ?string
174174 /**
175175 * @return list<non-empty-string>
176176 */
177- public function selectFiles (?string $ path = null , iterable $ filter = []): array
177+ public function selectFiles (?string $ directory = null , iterable $ filter = []): array
178178 {
179- if (!$ this ->intent (new FilesSelecting ($ this ->app , $ path , $ filter ))) {
179+ if (!$ this ->intent (new FilesSelecting ($ this ->app , $ directory , $ filter ))) {
180180 return [];
181181 }
182182
183183 $ filter = \iterator_to_array ($ filter , false );
184184
185- $ result = $ this ->selectMany ($ path , $ filter , $ this ->app ->saucer ->saucer_picker_pick_files (...));
185+ $ result = $ this ->selectMany ($ directory , $ filter , $ this ->app ->saucer ->saucer_picker_pick_files (...));
186186
187187 foreach ($ result as $ selection ) {
188- $ this ->dispatch (new FileSelected ($ this ->app , $ selection , $ path , $ filter ));
188+ $ this ->dispatch (new FileSelected ($ this ->app , $ selection , $ directory , $ filter ));
189189 }
190190
191191 return $ result ;
0 commit comments