RequestFileWritePermission() public method

public RequestFileWritePermission ( ) : bool
return bool
示例#1
0
        public override void CopyFile(FilePath source, FilePath dest, bool overwrite)
        {
            Repository repo = GetRepository(dest);

            if (!repo.RequestFileWritePermission(dest))
            {
                throw new System.IO.IOException("Write permission denied.");
            }

            base.CopyFile(source, dest, overwrite);
            repo.NotifyFileChanged(dest);
        }
        public override void CopyFile(FilePath source, FilePath dest, bool overwrite)
        {
            base.CopyFile(source, dest, overwrite);
            Repository repo = GetRepository(dest);

            if (!repo.RequestFileWritePermission(dest))
            {
                LoggingService.LogError("Write permission denied.");
                return;
            }
            repo.NotifyFileChanged(dest);
        }
        public override void CopyFile(string source, string dest, bool overwrite)
        {
            Repository repo = GetRepository(dest);

            if (repo.RequestFileWritePermission(dest))
            {
                base.CopyFile(source, dest, overwrite);
                repo.NotifyFileChanged(dest);
            }
            else
            {
                throw new System.IO.IOException("Write permission denied");
            }
        }
示例#4
0
        public override void RequestFileEdit(FilePath file)
        {
            Repository repo = GetRepository(file.FullPath);

            repo.RequestFileWritePermission(file);
        }
        public override void RequestFileEdit(IEnumerable <FilePath> files)
        {
            Repository repo = GetRepository(FilePath.GetCommonRootPath(files));

            repo.RequestFileWritePermission(files.ToArray());
        }
示例#6
0
        public override bool RequestFileEdit(FilePath file)
        {
            Repository repo = GetRepository(file);

            return(repo.RequestFileWritePermission(file));
        }