Exemplo n.º 1
0
        public Stream CreateFileStream(string path, FileStreamModes mode)
        {
            switch (mode)
            {
            case FileStreamModes.Create:
                return(new FileStream(path, FileMode.Create));

            case FileStreamModes.Open:
                return(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read));

            case FileStreamModes.Append:
                return(new FileStream(path, FileMode.Append));
            }

            throw new NotImplementedException("DefaultIOService.CreateFileStream - mode not implemented: " + mode.ToString());
        }
Exemplo n.º 2
0
        public Stream CreateFileStream(string path, FileStreamModes mode)
        {
            if (HTTPManager.Logger.Level == Logger.Loglevels.All)
            {
                HTTPManager.Logger.Verbose("DefaultIOService", string.Format("CreateFileStream path: '{0}' mode: {1}", path, mode));
            }

            switch (mode)
            {
            case FileStreamModes.Create:
                return(new FileStream(path, FileMode.Create));

            case FileStreamModes.Open:
                return(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read));

            case FileStreamModes.Append:
                return(new FileStream(path, FileMode.Append));
            }

            throw new NotImplementedException("DefaultIOService.CreateFileStream - mode not implemented: " + mode.ToString());
        }
Exemplo n.º 3
0
 public Stream CreateFileStream(string path, FileStreamModes mode)
 {
     throw new NotImplementedException();
 }