Home > Back-end >  want to get all files from device storage
want to get all files from device storage

Time:11-21

for getting all files in passing different extensions. Is there a way to get all extensions files from the file

  files = await fm.filesTree(excludedPaths: [
  "/storage/emulated/0/Android"
], extensions: [
  "jpg",
  "jpeg",
  "jfif",
  "png",
  "zip",
  "mp3",
] 

CodePudding user response:

Just remove the extensions: property.

files = await fm.filesTree(excludedPaths: ["/storage/emulated/0/Android"])

When you add the extensions property, then you add a filter to only allow those. If you remove it (or set it to null), then all files are added.

  • Related