Esempio n. 1
0
        public string run(
			string strLocalFolder,
			string strRemoteFolder,
			bool fBackup,
			IList listExcludeTheseFiles )
        {
            TransferredBytes = TotalJobSize = 0;
            _folder2Transfer = new Folder( strRemoteFolder );

            _fCurrentJobIsBackup = fBackup;
            foreach ( string strFN in Directory.GetFiles( strLocalFolder ) )
            {
                string strRemoteName = Path.GetFileName( strFN );
                if ( listExcludeTheseFiles != null )
                    if ( listExcludeTheseFiles.Contains( strRemoteName ) )
                        continue;
                if ( _fCurrentJobIsBackup && string.Compare( strRemoteName, "!order.plata", true ) == 0 )
                    strRemoteName = "!order.plata_backup";
                TotalJobSize += _folder2Transfer.AddLocalItem( strFN, strRemoteName ).Size;
            }

            _thread = new Thread(new ThreadStart(threadProc));
            _thread.Start();

            return null;
        }