views:

10

answers:

0

I want to search for files with .xml extension within my silverlight project, for example (ApplicationRoot)/Resources/102.xml

I know how to do this using System.IO.Directory:

        // create a collection to hold the file enumeration
        List<string> directoriesInFolder = new List<string>();

        // using the file api to enumerate
        // use the SpecialFolder API to get the users low trust "My Document" type folders
        IEnumerable<string> xmlFiles = Directory.EnumerateFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), "*.xml", SearchOption.AllDirectories);

But I want to get Relative paths to the files, because for some reason I can't load Absolute URIs with XDocument. Any help will be greatly appreciated