Renamed File/Directory Attributes to IsFile/Directory

This commit is contained in:
erri120 2020-04-06 14:23:36 +02:00
parent b8be153c99
commit 3bcab0db51
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -9,10 +9,10 @@ using Wabbajack.Common;
namespace Wabbajack.CLI
{
[AttributeUsage(AttributeTargets.Property)]
internal class FileAttribute : Attribute { }
internal class IsFileAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Property)]
internal class DirectoryAttribute : Attribute { }
internal class IsDirectoryAttribute : Attribute { }
internal static class CLIUtils
{
@ -50,12 +50,12 @@ namespace Wabbajack.CLI
var value = (string)valueObject;
if (p.HasAttribute(typeof(FileAttribute)))
if (p.HasAttribute(typeof(IsFileAttribute)))
{
valid = File.Exists(value);
}
if (p.HasAttribute(typeof(DirectoryAttribute)))
if (p.HasAttribute(typeof(IsDirectoryAttribute)))
{
valid = Directory.Exists(value);
}