Пример #1
0
        public IFile OpenFile(string sPath, bool fWrite)
        {
            var f = new AzureFile
            {
                BlobStream = fWrite ? _provider.GetWriteBlobStream(sPath) : _provider.GetReadBlobStream(sPath)
            };

            if (f.BlobStream == null)
            {
                return(null);
            }

            return(f);
        }
Пример #2
0
        public IFile OpenFile(string sPath, bool fWrite) {
            //var f = new AzureFile();
            //return f;

            sPath = PreparePath(sPath);
            var f = new AzureFile();
            try {
                AzureCloudFile file = _provider.Get(sPath, true);
                f.Load(file.Data);
                return f;
            } catch {
                return f;
            };
        }
Пример #3
0
        public IFile OpenFile(string sPath, bool fWrite)
        {
            var f = new AzureFile();
            if (fWrite == true)
            {
                f.BlobStream = _provider.GetWriteBlobStream(sPath);
            }
            else
            {
                f.BlobStream = _provider.GetReadBlobStream(sPath);
            }

            if (f.BlobStream == null)
                return null;

            return f;
        }
Пример #4
0
        public IFile OpenFile(string sPath, bool fWrite)
        {
            var f = new AzureFile();

            if (fWrite == true)
            {
                f.stream = _provider.GetWriteBlobStream(sPath);
            }
            else
            {
                f.stream = _provider.GetReadBlobStream(sPath);
            }

            if (f.stream == null)
            {
                return(null);
            }

            return(f);
        }
Пример #5
0
        public IFile OpenFile(string sPath, bool fWrite)
        {
            var f = new AzureFile
            {
                BlobStream = fWrite ? _provider.GetWriteBlobStream(sPath) : _provider.GetReadBlobStream(sPath)
            };

            if (f.BlobStream == null)
                return null;

            return f;
        }
Пример #6
0
 public IFile OpenFile(string sPath, bool fWrite)
 {
     var f = new AzureFile();
     return f;
 }
Пример #7
0
        public IFile OpenFile(string sPath, bool fWrite)
        {
            var f = new AzureFile();

            return(f);
        }
Пример #8
0
        public IFile OpenFile(string sPath, bool fWrite)
        {
            sPath = PreparePath(sPath);
            AzureCloudFile file = _provider.Get(sPath, true);

            if (file == null)
                return new AzureFile();

            var f = new AzureFile
            {
                File = new MemoryStream(file.Data)
            };
            return f;
        }