Hi Jovan,
You can get a full list of subfolders from your query like this:
var allSubfolders = MediaFileInfoProvider.GetMediaFiles()
.WhereStartsWith("FilePath", "Subfolder1")
.WhereEquals("FileLibraryID", mediaLibrary.LibraryId)
.Columns("FilePath")
.Select(x => x.FilePath)
.Distinct()
.OrderBy(x => x)
.ToList();