示例#1
0
 public static string ReadStringFromFile(this IFileSystem fileSystem, params string[] pathParts)
 {
     return(fileSystem.ReadStringFromFile(FileSystem.Combine(pathParts)));
 }
示例#2
0
        public static Project LoadFromFile(string filename)
        {
            if (!File.Exists(filename))
            {
                throw new FileNotFoundException("Could not locate designated Project File", filename);
            }

            var fileSystem = new FubuCore.FileSystem();
            var project = (Project) new ProjectFileLoader(fileSystem).Load(filename);
            return project;
        }
示例#3
0
 public static IEnumerable <string> ChildDirectoriesFor(this IFileSystem fileSystem, params string[] pathParts)
 {
     return(fileSystem.ChildDirectoriesFor(FileSystem.Combine(pathParts)));
 }
示例#4
0
 public static IEnumerable <string> FileNamesFor(this IFileSystem fileSystem, FileSet set, params string[] pathParts)
 {
     return(fileSystem.FindFiles(FileSystem.Combine(pathParts), set));
 }
示例#5
0
 public static T LoadFromFile <T>(this IFileSystem fileSystem, params string[] pathParts) where T : new()
 {
     return(fileSystem.LoadFromFile <T>(FileSystem.Combine(pathParts)));
 }
示例#6
0
 public static bool FileExists(this IFileSystem fileSystem, params string[] pathParts)
 {
     return(fileSystem.FileExists(FileSystem.Combine(pathParts)));
 }
示例#7
0
 public static void LaunchEditor(this IFileSystem fileSystem, params string[] pathParts)
 {
     fileSystem.LaunchEditor(FileSystem.Combine(pathParts));
 }
示例#8
0
 public static void CreateDirectory(this IFileSystem fileSystem, params string[] pathParts)
 {
     fileSystem.CreateDirectory(FileSystem.Combine(pathParts));
 }
示例#9
0
 public static void PersistToFile(this IFileSystem fileSystem, object target, params string[] pathParts)
 {
     fileSystem.WriteObjectToFile(FileSystem.Combine(pathParts), target);
 }