コード例 #1
0
        public Task <StoreItemResult> CreateItemAsync(string name, bool overwrite, IHttpContext httpContext)
        {
            if (!IsWritable)
            {
                return(Task.FromResult(new StoreItemResult(DavStatusCode.PreconditionFailed)));
            }

            var destinationPath = FullPath + "/" + name;

            DavStatusCode result = DavStatusCode.Created;

            var size = httpContext.Request.ContentLength();
            var f    = new MailRuCloudApi.File(destinationPath, size, FileType.SingleFile, null);

            return(Task.FromResult(new StoreItemResult(result, new MailruStoreItem(LockingManager, f, IsWritable))));
        }
コード例 #2
0
 public MailruStoreItem(ILockingManager lockingManager, MailRuCloudApi.File fileInfo, bool isWritable)
 {
     LockingManager = lockingManager;
     _fileInfo      = fileInfo;
     IsWritable     = isWritable;
 }