예제 #1
0
        public MemoryDirectoryObject AddFile(string fileName, string contents, DateTime modifiedDate)
        {
            var memoryFileObject = new MemoryFileObject(fileName, contents, modifiedDate);

            AddFile(memoryFileObject);
            return(this);
        }
예제 #2
0
        public MemoryDirectoryObject AddFile(string fileName)
        {
            var memoryFileObject = new MemoryFileObject(fileName);

            AddFile(memoryFileObject);
            return(this);
        }
예제 #3
0
        public IFileObject GetFile(string name)
        {
            MemoryFileObject file = null;

            if (!Files.ContainsKey(name))
            {
                file = new MemoryFileObject(name);
                file.SetPath(FullName);
                Files.Add(file.Name, file);
            }
            else
            {
                file = Files[name];
            }

            return(file);
        }
예제 #4
0
 private void AddFile(MemoryFileObject memoryFileObject)
 {
     memoryFileObject.Exists = true;
     memoryFileObject.SetPath(FullName);
     Files.Add(memoryFileObject.Name, memoryFileObject);
 }