B4J Question How to search the hard drive(s) for a given folder?

Cableguy

Expert
Licensed User
Well, the title says it all...

Given a name, how can we search ALL of the folders for a folder with the given name?
Also, how to list the system accessible hard drives?
 

Erel

Administrator
Staff member
Licensed User
There is no simple way to do it. You will need to actually go over all the folders by recursively calling File.ListFiles.

Also, how to list the system accessible hard drives?
B4X:
For Each drive As String In ListRoots
   Log(drive)
Next

Sub ListRoots As List
   Dim jo As JavaObject
   Dim o() As Object = jo.InitializeStatic("java.io.File").RunMethod("listRoots", Null)
   Return o
End Sub
 
Upvote 0

ThRuST

Well-Known Member
Licensed User
How to open any of the drives to browse contents on a Mac? Is Finder equal to Explorer on a PC?
 
Upvote 0
Top