You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, using Gaufrette v0.4.0,
I have a Filesystem created from either a Local Adapter or a FtpAdapter.
I need to list files inside current dir (not files inside subdirs)
Is there a way working for both cases ?
$fileSystem->listKeys()['keys'] works with LocalAdapter but returns keys inside subdirs when used with FtpAdapter
$filesystem->getAdapter()->listDirectory()['keys'] works with FTPAdapter but the method listDirectory() is not implemented in Local adpater.
EDIT
I just noticed that behaviour with PhpseclibSftp Adapter is the same as Local Adapter, i.e. the files inside the children directories are not listed twice. So IMHO, the behaviour for Ftp Adapter is a bug or is seriously misleading (a file inside a child dir will be listed twice, once as "file.ext" and another time as subdir/file.ext)
The text was updated successfully, but these errors were encountered:
pfleu
changed the title
How to get list of files in current dir not children dirs using different adapters ?
How to get list of files in current dir not subdirs using different adapters ?
Apr 28, 2022
Hello, using Gaufrette v0.4.0,
I have a Filesystem created from either a
Local
Adapter or aFtpAdapter
.I need to list files inside current dir (not files inside subdirs)
Is there a way working for both cases ?
$fileSystem->listKeys()['keys']
works with LocalAdapter but returns keys inside subdirs when used with FtpAdapter$filesystem->getAdapter()->listDirectory()['keys']
works with FTPAdapter but the method listDirectory() is not implemented in Local adpater.EDIT
I just noticed that behaviour with PhpseclibSftp Adapter is the same as Local Adapter, i.e. the files inside the children directories are not listed twice. So IMHO, the behaviour for Ftp Adapter is a bug or is seriously misleading (a file inside a child dir will be listed twice, once as "file.ext" and another time as subdir/file.ext)
The text was updated successfully, but these errors were encountered: