mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++/Python: Deprecate XMLFile.getPath and XMLFile.getFolder.
Both can be expressed using predicates inherited from `File`.
This commit is contained in:
@@ -117,11 +117,19 @@ class XMLFile extends XMLParent, File {
|
||||
/** Gets the name of this XML file. */
|
||||
override string getName() { result = File.super.getAbsolutePath() }
|
||||
|
||||
/** Gets the path of this XML file. */
|
||||
string getPath() { result = getAbsolutePath() }
|
||||
/**
|
||||
* DEPRECATED: Use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of this XML file.
|
||||
*/
|
||||
deprecated string getPath() { result = getAbsolutePath() }
|
||||
|
||||
/** Gets the path of the folder that contains this XML file. */
|
||||
string getFolder() { result = getParentContainer().getAbsolutePath() }
|
||||
/**
|
||||
* DEPRECATED: Use `getParentContainer().getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the path of the folder that contains this XML file.
|
||||
*/
|
||||
deprecated string getFolder() { result = getParentContainer().getAbsolutePath() }
|
||||
|
||||
/** Gets the encoding of this XML file. */
|
||||
string getEncoding() { xmlEncoding(this, result) }
|
||||
|
||||
Reference in New Issue
Block a user