|
using System.IO;
namespace Sedge.Core.FileSystemWrap
{
class DirectoryWrap : IDirectoryWrap
{
public IDirectoryInfoWrap CreateDirectory(string path)
{
return new DirectoryInfoWrap(Directory.CreateDirectory(path));
}
public void Delete(string path)
{
Directory.Delete(path);
}
public bool Exists(string path)
{
return Directory.Exists(path);
}
public IDirectoryInfoWrap GetDirectoryInfo(string path)
{
return new DirectoryInfoWrap(new DirectoryInfo(path));
}
public string[] GetDirectories(string path)
{
return Directory.GetDirectories(path);
}
public string[] GetFiles(string path)
{
return Directory.GetFiles(path);
}
public string[] GetFiles(string path, string searchPattern)
{
return Directory.GetFiles(path, searchPattern);
}
public string[] GetFiles(string path, string searchPattern, SearchOption searchOption)
{
return Directory.GetFiles(path, searchPattern, searchOption);
}
public IDirectoryInfoWrap GetParent(string path)
{
return new DirectoryInfoWrap(Directory.GetParent(path));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a software developer from Toronto with 15 years of experience in software design and development. My major professional area is the development of highly customized software solutions, including desktop and web applications. Industrial process automation and hardware-related software development are among my favorite projects and I enjoyed developing several applications for semiconductor manufacturing companies.
My blog: http://LunarFrog.com/blog