Ejemplo n.º 1
0
 private IEnumerable <string> EnumeratePaths(string root = "")
 {
     if (m_fileStore.FileExists(root))
     {
         if (Assets.GetType(AssetPath.GetExtension(root)) != null)
         {
             yield return(root);
         }
     }
     else if (m_fileStore.DirectoryExists(root))
     {
         foreach (var dirName in m_fileStore.ListDirectories(root))
         {
             var dirPath = AssetPath.Combine(root, dirName);
             foreach (var filePath in EnumeratePaths(dirPath))
             {
                 yield return(filePath);
             }
         }
         foreach (var fileName in m_fileStore.ListFiles(root))
         {
             var filePath = AssetPath.Combine(root, fileName);
             if (Assets.GetType(AssetPath.GetExtension(filePath)) != null)
             {
                 yield return(filePath);
             }
         }
     }
 }
Ejemplo n.º 2
0
 private string Resolve(string path)
 {
     return(AssetPath.Combine(m_rootPath, path));
 }