The Sleuth Kit Framework  4.1
Public Member Functions | List of all members
TskFileManager::AutoFilePtrList Class Reference

This nested class should be used to hold a FilePtrList object returned by methods such as findFilesByName() so that the file objects will be automatically freed. More...

#include <TskFileManager.h>

Public Member Functions

 AutoFilePtrList (FilePtrList v)
 
FilePtrList::iterator begin ()
 
FilePtrList::iterator end ()
 
FilePtrList::size_type size ()
 

Detailed Description

This nested class should be used to hold a FilePtrList object returned by methods such as findFilesByName() so that the file objects will be automatically freed.

Example:

AutoFilePtrList flist(fileManager.findFilesByName(fileName));
for (FilePtrList::iterator i = flist.begin(); i != flist.end(); ++i)
{ ... //do stuff }
// Don't worry about delete'ing each file obj--flist will take care of
// that when it goes out of scope.

The documentation for this class was generated from the following file:

Copyright © 2011-2013 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.