Пример #1
0
        public WopiCheckFileInfo GetCheckFileInfo()
        {
            WopiCheckFileInfo cfi = new WopiCheckFileInfo();

            cfi.BaseFileName = _fileinfo.Name;
            cfi.OwnerId      = _login;

            lock (_fileinfo)
            {
                if (_fileinfo.Exists)
                {
                    cfi.Size = _fileinfo.Length;
                }
                else
                {
                    cfi.Size = 0;
                }
            }

            cfi.Version               = _fileinfo.LastWriteTimeUtc.ToString("s");
            cfi.SupportsCoauth        = false;
            cfi.SupportsCobalt        = true;
            cfi.SupportsFolders       = true;
            cfi.SupportsLocks         = false;
            cfi.SupportsScenarioLinks = false;
            cfi.SupportsSecureStore   = false;
            cfi.SupportsUpdate        = true;
            cfi.UserCanWrite          = true;

            return(cfi);
        }
Пример #2
0
        public WopiCheckFileInfo GetCheckFileInfo()
        {
            WopiCheckFileInfo cfi = new WopiCheckFileInfo();

            cfi.BaseFileName = _fileinfo.Name;
            cfi.OwnerId = _login;

            lock (_fileinfo)
            {
                if (_fileinfo.Exists)
                {
                    cfi.Size = _fileinfo.Length;
                }
                else
                {
                    cfi.Size = 0;
                }
            }

            cfi.Version = _fileinfo.LastWriteTimeUtc.ToString("s");
            cfi.SupportsCoauth = false;
            cfi.SupportsCobalt = true;
            cfi.SupportsFolders = true;
            cfi.SupportsLocks = false;
            cfi.SupportsScenarioLinks = false;
            cfi.SupportsSecureStore = false;
            cfi.SupportsUpdate = true;
            cfi.UserCanWrite = true;

            return cfi;
        }