// Get files under given path public static List <string> GetFilePathsInFolder(string folderPath, bool includeHidden = false, bool includeMeta = !Model.Settings.IGNORE_META) { var filePaths = Directory.GetFiles(folderPath).Select(p => p); if (!includeHidden) { filePaths = filePaths.Where(path => !(Path.GetFileName(path).StartsWith(Model.Settings.DOTSTART_HIDDEN_FILE_HEADSTRING))); } if (!includeMeta) { filePaths = filePaths.Where(path => !FileUtility.IsMetaFile(path)); } // Directory.GetFiles() returns platform dependent delimiter, so make sure replace with "/" if (Path.DirectorySeparatorChar != Model.Settings.UNITY_FOLDER_SEPARATOR) { filePaths = filePaths.Select(filePath => filePath.Replace(Path.DirectorySeparatorChar.ToString(), Model.Settings.UNITY_FOLDER_SEPARATOR.ToString())); } return(filePaths.ToList()); }