public override Dir_Jrod CreateDir(string fileName) { if (fileName.Contains("/") || fileName.Contains("\\")) { return(null); } // check their arent any files or dirs with the same name foreach (MemFSDir x in dirs) { if (x.Name == fileName) { return(null); } } foreach (MemFSFile x in files) { if (x.Name == fileName) { return(null); } } MemFSDir dir = new MemFSDir(fileName, this); dirs.Add(dir); return(dir); }
public MemoryFileSystem() { root = new MemFSDir("files", null); }
// this sets the root dir public MemoryFileSystem(string rootDir) { root = new MemFSDir(rootDir, null); }