Binary Ninja API C++: TempFile
TemporaryFile is used for creating temporary files, stored (temporarily) in the system's default temporary file directory.
Public Member Functions | |
| TemporaryFile () | |
| TemporaryFile (const DataBuffer &contents) | |
| Create a new temporary file with BinaryNinja::DataBuffer contents. | |
| TemporaryFile (const std::string &contents) | |
| Create a new temporary file with string contents. | |
| TemporaryFile (BNTemporaryFile *file) | |
| bool | IsValid () const |
| std::string | GetPath () const |
| Path to the TemporaryFile on the filesystem. | |
| DataBuffer | GetContents () |
| DataBuffer with contents of the file. | |
| Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNTemporaryFile, BNNewTemporaryFileReference, BNFreeTemporaryFile > | |
| CoreRefCountObject () | |
| virtual | ~CoreRefCountObject () |
| BNTemporaryFile * | GetObject () const |
| void | AddRef () |
| void | Release () |
| void | AddRefForRegistration () |
| void | ReleaseForRegistration () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Additional Inherited Members | |
| Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNTemporaryFile, BNNewTemporaryFileReference, BNFreeTemporaryFile > | |
| std::atomic< int > | m_refs |
| bool | m_registeredRef |
| BNTemporaryFile * | m_object |
Constructor & Destructor Documentation
◆ TemporaryFile() [1/4]
| TemporaryFile::TemporaryFile | ( | ) |
◆ TemporaryFile() [2/4]
| TemporaryFile::TemporaryFile | ( | const DataBuffer & | contents | ) |
Create a new temporary file with BinaryNinja::DataBuffer contents.
- Parameters
-
contents DataBuffer with contents to write to the file.
◆ TemporaryFile() [3/4]
| BinaryNinja::TemporaryFile::TemporaryFile | ( | const std::string & | contents | ) |
Create a new temporary file with string contents.
- Parameters
-
contents std::string with contents to write to the file.
◆ TemporaryFile() [4/4]
| TemporaryFile::TemporaryFile | ( | BNTemporaryFile * | file | ) |
Member Function Documentation
◆ IsValid()
|
inline |
◆ GetPath()
| string TemporaryFile::GetPath | ( | ) | const |
Path to the TemporaryFile on the filesystem.
◆ GetContents()
| DataBuffer TemporaryFile::GetContents | ( | ) |
DataBuffer with contents of the file.