Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

fileutil.cpp File Reference

File utilities. More...

#include <wx/wxprec.h>
#include <wx/wx.h>
#include <wx/filename.h>
#include "fileutil.hpp"
#include "checksumfactory.hpp"
#include "fdftlmk.hpp"
#include "sumfile.hpp"
#include "md5file.hpp"
#include "sfvfile.hpp"
#include "compat.hpp"

Include dependency graph for fileutil.cpp:

Include dependency graph

Go to the source code of this file.

Functions

wxFileDialogFilterMaker getFilterForKnownTypesOfChecksumsFiles ()
 Gets a filter for the known types of checksums' files.

SumFileopenChecksumFile (const wxFileName &fileName)
 Opens and read the given checksum file.


Detailed Description

File utilities.

Definition in file fileutil.cpp.


Function Documentation

wxFileDialogFilterMaker getFilterForKnownTypesOfChecksumsFiles  ) 
 

Gets a filter for the known types of checksums' files.

  • First entry contains all known types of checksums' files.
  • Next entries are all the known types listed in the order defined in the SumFileFactory::SumFileType enumeration.
  • Last entry is all the files.

Returns:
A filter for the known types of checksums' files.

Definition at line 65 of file fileutil.cpp.

References wxFileDialogFilterMaker::AddFilter(), and SumFileFactory::getSumFilesCount().

Referenced by dlgMultiCheckConf::getFiltersForAddFilesDialog().

SumFile* openChecksumFile const wxFileName &  fileName  ) 
 

Opens and read the given checksum file.

This function tries to choose the checksum file format with :

  • The file extension first.
  • The order of priority next (tries all the known formats).

The caller must delete the returned object with the operator delete.

Parameters:
fileName Name of the file to open.
Returns:
A pointer on the checksum file that is been read or NULL on failure. The caller must delete the returned object with the operator delete.

Definition at line 93 of file fileutil.cpp.

References SFVFile::read(), and MD5File::read().

Referenced by ChecksumsListView::DnDFiles().


Generated on Sun May 30 13:37:56 2004 for wxChecksums by doxygen 1.3.7