added some file types

This commit is contained in:
CareBear_cp 2008-03-15 11:52:07 +00:00
parent e1220c7586
commit dd8ce3cffa
4 changed files with 47 additions and 2 deletions

View file

@ -40,8 +40,10 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="File.cs" />
<Compile Include="IFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Windows\File.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View file

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Cosmos.Kernel.FileSystems
{
/// <summary>
/// Static utility class that wraps the underlaying filesystem.
/// </summary>
public static class File
{
private static IFile _file;
public static void SetFileSystem(IFile fileSystem)
{
_file = fileSystem;
}
public static bool Exists(string path)
{
return _file.Exists(path);
}
}
}

View file

@ -4,7 +4,8 @@ using System.Text;
namespace Cosmos.Kernel.FileSystems
{
public class Class1
public interface IFile
{
bool Exists(string path);
}
}

View file

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Cosmos.Kernel.FileSystems.Windows
{
/// <summary>
/// Implementation of operations on the Windows file system.
/// </summary>
public class File : IFile
{
public bool Exists(string path)
{
return true;
}
}
}