SBFileSpec¶
-
class
lldb.
SBFileSpec
(*args)¶ Represents a file specification that divides the path into a directory and basename. The string values of the paths are put into uniqued string pools for fast comparisons and efficient memory usage.
For example, the following code
lineEntry = context.GetLineEntry() self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory', exe=False, substrs = [self.mydir]) self.expect(lineEntry.GetFileSpec().GetFilename(), 'The line entry should have the correct filename', exe=False, substrs = ['main.c']) self.assertTrue(lineEntry.GetLine() == self.line, 'The line entry's line number should match ')
gets the line entry from the symbol context when a thread is stopped. It gets the file spec corresponding to the line entry and checks that the filename and the directory matches what we expect.
Attributes Summary
basename
A read only property that returns the path basename as a python string. dirname
A read only property that returns the path directory name as a python string. exists
A read only property that returns a boolean value that indicates if the file exists. fullpath
A read only property that returns the fullpath as a python string. Methods Summary
AppendPathComponent
(SBFileSpec self, …)Exists
(SBFileSpec self)GetDescription
(SBFileSpec self, …)GetDirectory
(SBFileSpec self)GetFilename
(SBFileSpec self)GetPath
(SBFileSpec self, char * dst_path, …)IsValid
(SBFileSpec self)ResolveExecutableLocation
(SBFileSpec self)ResolvePath
(char const * src_path, …)SetDirectory
(SBFileSpec self, …)SetFilename
(SBFileSpec self, …)Attributes Documentation
-
basename
¶ A read only property that returns the path basename as a python string.
-
dirname
¶ A read only property that returns the path directory name as a python string.
-
exists
¶ A read only property that returns a boolean value that indicates if the file exists.
-
fullpath
¶ A read only property that returns the fullpath as a python string.
Methods Documentation
-
AppendPathComponent
(SBFileSpec self, char const * file_or_directory)¶
-
Exists
(SBFileSpec self) → bool¶
-
GetDescription
(SBFileSpec self, SBStream description) → bool¶
-
GetDirectory
(SBFileSpec self) → char const *¶
-
GetFilename
(SBFileSpec self) → char const *¶
-
GetPath
(SBFileSpec self, char * dst_path, size_t dst_len) → uint32_t¶
-
IsValid
(SBFileSpec self) → bool¶
-
ResolveExecutableLocation
(SBFileSpec self) → bool¶
-
static
ResolvePath
(char const * src_path, char * dst_path, size_t dst_len) → int¶
-
SetDirectory
(SBFileSpec self, char const * directory)¶
-
SetFilename
(SBFileSpec self, char const * filename)¶
-