adobe / aio-lib-files

An abstraction on top of cloud blob storage exposing a file system like API
https://www.adobe.io
Apache License 2.0
10 stars 14 forks source link

Enhancement request for add support for listing files with filter and option to get number of files in a folder #150

Open raga-adbe-gh opened 3 months ago

raga-adbe-gh commented 3 months ago

The files.list([filePath]) API is described as Lists files in a remote folder. If called on a file returns the file info if the file exists. If the file or folder does not exist returns an empty array. Requesting following enhancement

  1. An option to get the number of files in the path - Currently we are listing the files and counting them. This consumes memory.
  2. In case in a path there are different types/pattern of file Example - docx, xlsx and/or a01.jpg, a02.jpg, b01.jpg, b02.jpg. If there is a provision to selective list with file pattern would be very helpful. Example .docx or a.jpg

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

aiojbot commented 3 months ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2929