The Sleuth Kit Framework
4.1
|
Responsible for managing TskFile objects in the system. More...
#include <TskFileManager.h>
Classes | |
class | AutoFilePtrList |
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... | |
Public Types | |
typedef TskFile * | FilePtr |
typedef std::vector< FilePtr > | FilePtrList |
Public Member Functions | |
virtual void | addFile (const uint64_t fileId, std::istream &istr)=0 |
Add a file to the system using the given file id and input stream. More... | |
virtual void | addFile (const uint64_t fileId, std::wstring &filePath)=0 |
Add a file to the system using the given file id and path. More... | |
virtual void | copyDirectory (TskFile *directoryToCopy, const std::wstring &destinationPath, const bool bRecurse=false)=0 |
Copy the contents of a directory to the given fully qualifed file path. More... | |
virtual void | copyDirectory (uint64_t directoryIdToCopy, const std::wstring &destinationPath, const bool bRecurse=false) |
Copy the contents of a directory to the given fully qualifed file path. More... | |
virtual void | copyFile (TskFile *fileToSave, const std::wstring &filePath)=0 |
Copy the file to the given fully qualifed file path. More... | |
virtual void | copyFile (const uint64_t fileId, const std::wstring &filePath) |
Copy the file to the given fully qualifed file path. More... | |
virtual void | deleteFile (TskFile *fileToDelete)=0 |
Delete the local copy of a file. More... | |
virtual void | deleteFile (const uint64_t fileId) |
Delete the local copy of a file. More... | |
virtual FilePtrList | findFilesByExtension (const std::vector< std::string > &extensions)=0 |
Return a list of any TskFile objects matching the given filename extension. More... | |
virtual FilePtrList | findFilesByFsFileType (TSK_FS_META_TYPE_ENUM fsFileType)=0 |
Return a list of any TskFile objects that match the given file meta type. More... | |
virtual FilePtrList | findFilesByName (const std::string &name, const TSK_FS_META_TYPE_ENUM fsFileType=TSK_FS_META_TYPE_UNDEF)=0 |
Return a list of any TskFile objects matching the given filename. More... | |
virtual FilePtrList | findFilesByParent (const uint64_t parentFileId)=0 |
Return a list of any TskFile objects that are children of the given file id. More... | |
virtual FilePtrList | findFilesByPattern (const std::string &namePattern, const std::string &pathPattern)=0 |
Return a list of any TskFile objects that match the given file and path patterns. More... | |
virtual TskFile * | getFile (const uint64_t fileId)=0 |
Return a TskFile object for a given file ID. More... | |
virtual FilePtrList | getFiles (const std::vector< uint64_t > &fileIds)=0 |
Return a list of TskFile objects mapped to the given list of file ids. More... | |
virtual std::wstring | getPath (const uint64_t fileId)=0 |
Return the fully qualified path to where the local instance of the file with the given ID should exist. More... | |
virtual void | saveFile (TskFile *fileToSave)=0 |
Save the file to the default location. More... | |
virtual void | saveFile (const uint64_t fileId) |
Save the file to the default location. More... | |
Protected Member Functions | |
TskFileManager () | |
Default Constructor. | |
TskFileManager (TskFileManager const &) | |
Copy Constructor. | |
virtual | ~TskFileManager () |
Destructor. | |
Responsible for managing TskFile objects in the system.
|
pure virtual |
Add a file to the system using the given file id and input stream.
This method saves a local copy of the content contained in the input stream.
fileId | ID of the new file. |
istr | Input stream containing the file content to save. |
TskFileException | if a file with the given fileId already exists or if an error is encountered while saving the input stream. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Add a file to the system using the given file id and path.
This method saves a local copy of the file given in the path.
fileId | ID of the new file. |
filePath | The path of the file to save. |
TskFileException | if a file with the given fileId already exists, the file specified in filePath does not exist or an error is encountered while saving the file. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Copy the contents of a directory to the given fully qualifed file path.
Directories along the path will be created if they do not exist. If the destination directory exists it will be replaced. Defaults to a non-recursive copy.
directoryToCopy | The TskFile object representing the directory to copy. |
destinationPath | The path to save directory contents to, including the directory name. |
bRecurse | Whether to recursively copy directory contents. |
various | exceptions on errors |
Implemented in TskFileManagerImpl.
|
inlinevirtual |
Copy the contents of a directory to the given fully qualifed file path.
Directories along the path will be created if they do not exist. If the destination directory exists it will be replaced. Defaults to a non-recursive copy.
directoryIdToCopy | The id representing the directory to copy. |
destinationPath | The path to save directory contents to, including the directory name. |
bRecurse | Whether to recursively copy directory contents. |
various | exceptions on errors |
|
pure virtual |
Copy the file to the given fully qualifed file path.
Directories along the path will be created if they do not exist. If the destination file exists it will be replaced.
fileToSave | The file to save. |
filePath | The path to save to, including the file name. |
various | exceptions on errors |
Implemented in TskFileManagerImpl.
|
inlinevirtual |
Copy the file to the given fully qualifed file path.
Directories along the path will be created if they do not exist. If the destination file exists it will be replaced.
fileId | ID of the file to save. |
filePath | The path to save to, including the file name. |
various | exceptions on errors |
|
pure virtual |
Delete the local copy of a file.
fileToDelete | Object of file to delete local copy of |
various | exceptions on errors |
Implemented in TskFileManagerImpl.
|
inlinevirtual |
Delete the local copy of a file.
fileId | ID of file to delete local copy of |
various | exceptions on errors |
|
pure virtual |
Return a list of any TskFile objects matching the given filename extension.
extensions | List of file name extension strings. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return a list of any TskFile objects that match the given file meta type.
fsFileType | File meta type. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return a list of any TskFile objects matching the given filename.
name | The file name. |
fsFileType | Optional file meta type. Will not filter on meta_type if this is omitted. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return a list of any TskFile objects that are children of the given file id.
parentFileId | ID of parent file. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return a list of any TskFile objects that match the given file and path patterns.
namePattern | File name pattern. Can include "%" wildcards. |
pathPattern | File path pattern. Can include "%" wildcards. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return a TskFile object for a given file ID.
fileId | ID of file to return object of. |
TskException | in case of error. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return a list of TskFile objects mapped to the given list of file ids.
fileIds | List of fileId IDs. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Return the fully qualified path to where the local instance of the file with the given ID should exist.
This does not validate that the ID is for a file and does not validate that the file actually exists.
fileId | Id of the file. |
Implemented in TskFileManagerImpl.
|
pure virtual |
Save the file to the default location.
fileToSave | File object of the file to save. |
various | exceptions on errors |
Implemented in TskFileManagerImpl.
Referenced by TskFile::save().
|
inlinevirtual |
Save the file to the default location.
fileId | ID of the file to save. |
various | exceptions on errors |
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.