Getting list of files from specified folder

Hi everybody!

How can i get ALL the files from custom path(non-unity assets folder) into array, or some kind of list?

P.S. Sorry for my bad English.

In C# you can do it with:

using System.IO;

DirectoryInfo dir = new DirectoryInfo(myPath);
FileInfo[] info = dir.GetFiles("*.*");
foreach (FileInfo f in info) 
{
    ...
}

I got my answer suddenly.

Here it goes:

In the top of the js script

import System.IO;

And in the function

var filePaths : String[] = Directory.GetFiles("C:/Users/Altair-X/Music/","*.mp3");

Where "filePaths : String[]" - is an array of string, which contains paths to the files.

"C:/Users/Altair-X/Music/" - where to look for.

"*.mp3" - what to look for.