Index: src/ch/FileInfo.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -rd2b121c78f510b5384b8ef0ca80afbfd7f77fef7 --- src/ch/FileInfo.h (.../FileInfo.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/FileInfo.h (.../FileInfo.h) (revision d2b121c78f510b5384b8ef0ca80afbfd7f77fef7) @@ -1,22 +1,21 @@ -/************************************************************************ - Copy Handler 1.x - program for copying data in Microsoft Windows - systems. - Copyright (C) 2001-2004 Ixen Gerthannes (copyhandler@o2.pl) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*************************************************************************/ +/*************************************************************************** +* Copyright (C) 2001-2008 by J�zef Starosczyk * +* ixen@copyhandler.com * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU Library General Public License * +* (version 2) as published by the Free Software Foundation; * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU Library General Public * +* License along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ /** * @doc FILEINFO * @module FileInfo.h 1.3 - Interface for the CFileInfo and CFileInfoArray classes | @@ -70,6 +69,10 @@ #define DATE_MODIFIED 1 #define DATE_LASTACCESSED 2 +// CFileInfo flags +// flag stating that file has been processed (used to determine if file can be deleted at the end of copying) +#define FIF_PROCESSED 0x00000001 + class CFileInfo; class CFileFilter @@ -241,6 +244,9 @@ bool IsTemporary(void) const { return (m_dwAttributes & FILE_ATTRIBUTE_TEMPORARY) != 0; }; /** @cmember Returns TRUE if the file is temporary */ bool IsNormal(void) const { return m_dwAttributes == 0; }; /** @cmember Returns TRUE if the file is a normal file */ + uint_t GetFlags() const { return m_uiFlags; } + void SetFlags(uint_t uiFlags, uint_t uiMask = 0xffffffff) { m_uiFlags = (m_uiFlags & ~(uiFlags & uiMask)) | (uiFlags & uiMask); } + // operations void SetClipboard(CClipboardArray *pClipboard) { m_pClipboard=pClipboard; }; CString GetDestinationPath(CString strPath, unsigned char ucCopyNumber, int iFlags); @@ -268,6 +274,7 @@ COleDateTime m_timLastAccess; /** @cmember Last Access time */ COleDateTime m_timLastWrite; /** @cmember Last write time */ + uint_t m_uiFlags; // ptrs to elements providing data CClipboardArray *m_pClipboard; }; @@ -316,12 +323,45 @@ int AddFile(CString strFilePath, int iSrcIndex); // store/restore - void Store(CArchive& ar) { int iSize=GetSize(); ar<>iSize; SetSize(iSize, 5000); CFileInfo fi; fi.SetClipboard(m_pClipboard); - for (int i=0;i>iSize; + SetSize(iSize, 5000); + CFileInfo fi; + fi.SetClipboard(m_pClipboard); + uint_t uiFlags = 0; + for (INT_PTR i=0;i> uiFlags; + rInfo.SetFlags(uiFlags); + } + else + { + fi.Load(ar); + SetAt(i, fi); + } + } + } protected: - CClipboardArray* m_pClipboard; };