/// <summary> /// Checks for the existence of the given path on the filesystem and attempts to create it if not present. /// </summary> /// <param name="directoryPath">The path to check</param> public void CreateDirectoryIfNotExists(string directoryPath) { DirectoryWrap directory = new DirectoryWrap(); if (!directory.Exists(directoryPath)) { directory.CreateDirectory(directoryPath); } }
/// <summary> /// Checks to see if a directory path exists. /// </summary> /// <param name="directoryPath">input directory path.</param> /// <returns>true if directory path exists. False if not exist.</returns> public bool DirectoryExists(string directoryPath) { var dirWrap = new DirectoryWrap(); return dirWrap.Exists(directoryPath); }