本文整理汇总了C#中Directory.EnsureExists方法的典型用法代码示例。如果您正苦于以下问题:C# Directory.EnsureExists方法的具体用法?C# Directory.EnsureExists怎么用?C# Directory.EnsureExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Directory
的用法示例。
在下文中一共展示了Directory.EnsureExists方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PendingDirectory
// ReSharper disable once SuggestBaseTypeForParameter
public PendingDirectory(InstallationDirectory installationDirectory, SystemClock clock)
{
_pendingLocation = installationDirectory.GetChildDirectory(LocationExtensions.Pending);
_pendingLocation.EnsureExists();
_clock = clock;
}
示例2: ReadyDirectory
public ReadyDirectory(InstallationDirectory installationDirectory, SystemClock clock)
{
_readyLocation = installationDirectory.GetChildDirectory(LocationExtensions.Ready);
_readyLocation.EnsureExists();
_clock = clock;
}
示例3: ArchiveDirectory
public ArchiveDirectory(InstallationDirectory installationDirectory)
{
_location = installationDirectory.GetChildDirectory(LocationExtensions.Archive);
_location.EnsureExists();
}
示例4: ProcessingDirectory
public ProcessingDirectory(Directory directory)
{
_location = directory.GetChildDirectory(LocationExtensions.Processing);
_location.EnsureExists();
}
示例5: ErrorDirectory
public ErrorDirectory(Directory directory)
{
_location = directory.GetChildDirectory(LocationExtensions.Error);
_location.EnsureExists();
}