Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

326
Views
Obtener tamaño de carpeta en React native

estoy usando react-native-fs

 RNFS.readDir(RNFetchBlob.fs.dirs.DocumentDir + "/data/" + id + "/").then((result) => { const numOfItems = result; let totalSum = numOfItems.reduce((n, { size }) => n + size, 0) });

Estoy usando este código para obtener el tamaño de la carpeta. Está funcionando bien como se esperaba. Pero se detiene para calcularlo ya que la carpeta tiene subcarpetas. Tampoco es capaz de distinguir entre archivos y carpetas. Entonces, avíseme si tengo 5 o 10 subcarpetas, ¿cómo puedo obtener el tamaño completo de la carpeta?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!