private void CopiesFile(SimpleFile file, ConnectionInfo inf)
        {
            string path = Directory.GetCurrentDirectory() + @"\Dir";

            DirectoryInfo info = Directory.CreateDirectory(path);

            info.Attributes = info.Attributes & ~FileAttributes.ReadOnly;
            try
            {
                var fi = file.CopyToPath(path);

                if (Copied(path, fi.FullPath) && !Deleted())
                {
                    condition = true;
                }

                fi.Delete();
                fi.Dispose();
                file.Delete();
            }
            finally
            {
                Directory.Delete(path, true);
            }
        }
        private void CopiesAndOverwries(SimpleFile file, ConnectionInfo inf)
        {
            string path = Directory.GetCurrentDirectory() + @"\Dir";

            Directory.CreateDirectory(path);
            file.CopyToPath(path, OverwriteFile: true).Dispose();
            var fi = file.CopyToPath(path, OverwriteFile: true);

            if (Copied(path, fi.FullPath) && !Deleted())
            {
                condition = true;
            }

            fi.Delete();
            fi.Dispose();
            file.Delete();

            Directory.Delete(path, true);
        }