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()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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.