C++/Python: Deprecate XMLFile.getPath and XMLFile.getFolder.

Both can be expressed using predicates inherited from `File`.
This commit is contained in:
Max Schaefer
2019-12-17 08:53:26 +00:00
parent 47c1fc7358
commit a17b615ae5
2 changed files with 24 additions and 8 deletions

View File

@@ -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) }