The Sleuth Kit Framework
4.1
|
Contains commonly needed utility methods. More...
#include <TskUtilities.h>
Static Public Member Functions | |
static void | cleanUTF8 (char *buf) |
static bool | getHostIP (const std::string &host, std::string &host_ip) |
Get the IP address for the given host name. More... | |
static std::string | getProgDir () |
Get the path of the directory where the currently executing program is installed. More... | |
static std::string | stripQuotes (const std::string &str) |
Strip matching leading and trailing double quotes from the input str. More... | |
static std::wstring | toUTF16 (const std::string &utf8Str) |
Convert a given UTF8 string to UTF16. More... | |
static std::string | toUTF8 (const std::wstring &utf16Str) |
Convert a given UTF16 string to UTF8. More... | |
Contains commonly needed utility methods.
Refer to the poco library for other commonly needed methods.
|
static |
Get the IP address for the given host name.
host | The name of the host who's IP address you want. |
host_ip | This string will be filled in with the IP address. |
References LOGERROR.
Referenced by TskImgDBPostgreSQL::open().
|
static |
Get the path of the directory where the currently executing program is installed.
References toUTF8().
Referenced by TskSystemProperties::get().
|
static |
Strip matching leading and trailing double quotes from the input str.
If there is no matching quotes, the input str is returned.
|
static |
Convert a given UTF8 string to UTF16.
utf8Str | The UTF8 encoded string. |
References TSKconversionOK, and TSKstrictConversion.
Referenced by TskFileManagerImpl::copyDirectory(), TskSystemProperties::expandMacrosW(), Log::getLogPathW(), TskFileManagerImpl::getPath(), TskSystemProperties::getW(), and TskCarveExtractScalpel::processFile().
|
static |
Convert a given UTF16 string to UTF8.
utf16Str | The UTF16 encoded string. |
References TSKconversionOK, and TSKstrictConversion.
Referenced by TskFileManagerImpl::addFile(), TskFileManagerImpl::copyDirectory(), TskFileManagerImpl::copyFile(), TskSystemProperties::expandMacrosW(), getProgDir(), TskSystemProperties::getW(), TskSystemPropertiesImpl::initialize(), Log::log(), TskImageFileTsk::open(), Log::open(), TskFileManagerImpl::saveFile(), and TskSystemProperties::setW().
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.