Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8088819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:11:59+00:00 2026-06-05T19:11:59+00:00

Does File.list() have a longer run time if there are more files in its

  • 0

Does File.list() have a longer run time if there are more files in its folder? For example, if I have 5 files vs 200,000 files, I assume the later would take longer to return?

Thanks

http://developer.android.com/reference/java/io/File.html#list()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:12:01+00:00Added an answer on June 5, 2026 at 7:12 pm

    File.list() returns an array. Of course with a bigger array it will take more time to allocate and populate it. In addition any file system slows down with number of objects in a directory. IOW, yes with growing number of files in a directory File.list() will take more time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of hidden files in a file list_files that should not
I have a text file and in it there is a list of city:
In MATLAB, why does the file have to be saved prior to running ?
i have a j2me application , it does the File IO operation, but every
I will have 2 directories, folder1 with a set files list, and folder2 with
I have a directory tree structure. Each time I click a folder, jQuery.ajax fires
I have the following code which utilises Guava's Files.readLines() method: List<String> strings = Lists.newArrayList();
Does File.deleteOnExit() guarantee that the file is deleted even if the JVM is killed
Does file_get_contents maintain line breaks? I thought it did but I have tried this:
The following .htaccess file does not work: SSLrequireSSL RewriteEngine on RewriteCond %{HTTP_HOST} !^secure\.neuralfutures\.com [NC]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.