Newer
Older
Qwilight / Igniter / Utilities / IOUtility.cs
@Taehui Taehui on 22 Aug 807 bytes 2024-08-22 오후 12:18
using System;
using System.IO;

namespace Igniter.Utilities
{
    public static partial class Utility
    {
        public static string[] GetFiles(string entryPath, string o = "*")
        {
            try
            {
                return Directory.Exists(entryPath) ? Directory.GetFiles(entryPath, o) : Array.Empty<string>();
            }
            catch
            {
                return Array.Empty<string>();
            }
        }

        public static string[] GetEntry(string entryPath, string o = "*")
        {
            try
            {
                return Directory.Exists(entryPath) ? Directory.GetDirectories(entryPath, o) : Array.Empty<string>();
            }
            catch
            {
                return Array.Empty<string>();
            }
        }
    }
}