Rasagar/Library/PackageCache/com.unity.package-validation-suite/Editor/ValidationSuite/Utilities/SamplesUtilities.cs
2024-08-26 23:07:20 +03:00

28 lines
883 B
C#

using System.IO;
namespace UnityEditor.PackageManager.ValidationSuite
{
internal static class SamplesUtilities
{
public const string SamplesDirName = "Samples";
public const string SamplesTildeDirName = "Samples~";
internal struct SampleDirInfo
{
public bool SamplesDirExists;
public bool SamplesTildeDirExists;
}
public static SampleDirInfo GetSampleDirectoriesInfo(string packagePath)
{
var samplesDirExists = Directory.Exists(Path.Combine(packagePath, SamplesDirName));
var samplesTildeDirExists = Directory.Exists(Path.Combine(packagePath, SamplesTildeDirName));
return new SampleDirInfo()
{
SamplesDirExists = samplesDirExists,
SamplesTildeDirExists = samplesTildeDirExists
};
}
}
}