Beispiel #1
0
        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);
        }
Beispiel #2
0
 public MemoryFileSystem()
 {
     root = new MemFSDir("files", null);
 }
Beispiel #3
0
 // this sets the root dir
 public MemoryFileSystem(string rootDir)
 {
     root = new MemFSDir(rootDir, null);
 }