[Resolved]How to map the files and subdirectories of a directory?

using UnityEngine;
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

        public class RecursiveFileProcessor 
        {
            public static void Main(string[] args) 
            {
                foreach(string path in args) 
                {
                    if(File.Exists(path)) 
                    {
                        // This path is a file
                        ProcessFile(path); 
                    }               
                    else if(Directory.Exists(path)) 
                    {
                        // This path is a directory
                        ProcessDirectory(path);
                    }
                    else 
                    {
                   Console.WriteLine("{0} is not a valid file or directory.", path);
               }        
           }        
       }

       // Process all files in the directory passed in, recurse on any directories  
       // that are found, and process the files they contain. 
       public static void ProcessDirectory(string targetDirectory) 
       {
           // Process the list of files found in the directory. 
           string [] fileEntries = Directory.GetFiles(targetDirectory);
           foreach(string fileName in fileEntries)
               ProcessFile(fileName);

           // Recurse into subdirectories of this directory. 
           string [] subdirectoryEntries = Directory.GetDirectories(targetDirectory);
           foreach(string subdirectory in subdirectoryEntries)
        ProcessDirectory(subdirectory);
       }

       // Insert logic for processing found files here. 
       public static void ProcessFile(string path) 
       {
           Console.WriteLine("Processed file '{0}'.", path);	    
       }
   }

For those who are humble. Who waste their time helping people. I leave the solution below. With this code you can map all subfolders and files in a given directory:
NOTE: I could not alone have helped me!

             ////////////////////
    using System.IO;

using UnityEngine;

using System;	

using System.Collections;

using System.Collections.Generic;

              

public class ListDirectory: MonoBehaviour {

public String[] paths;


void Start()
{
	foreach(string path in paths)
	{

		if(File.Exists(path))
		{
			Debug.Log("2" + path);
			// This path is a file
			ProcessFile(path);
		}              
		else if(Directory.Exists(path))
		{
			Debug.Log("3" + path);
			// This path is a directory
			ProcessDirectory(path);
		}
		else
		{
			Debug.Log("4" + path);
		}        
	}        
}


// Process all files in the directory passed in, recurse on any directories  
// that are found, and process the files they contain.
public static void ProcessDirectory(string targetDirectory)
{
	string [] fileEntries = Directory.GetFiles(targetDirectory);
	foreach(string fileName in fileEntries)
		ProcessFile(fileName);
	
	string [] subdirectoryEntries = Directory.GetDirectories(targetDirectory);
	foreach(string subdirectory in subdirectoryEntries)
		ProcessDirectory(subdirectory);
}

public static void ProcessFile(string path)
{
	Debug.Log("Processed file '{0}'." + path);          
}
}

@Jeff_Kesselman = NOB

You don’t have an args list jun Unity so there is no way to use it as written.

Get your list of files however you are going to get it, then say

                foreach(string path in myFileList) 
                {
                    if(File.Exists(path)) 
                    {
                        // This path is a file
                        ProcessFile(path); 
                    }               
                    else if(Directory.Exists(path)) 
                    {
                        // This path is a directory
                        ProcessDirectory(path);
                    }
                    else 
                    {
                   Console.WriteLine("{0} is not a valid file or directory.", path);
               }