예제 #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);
 }