Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Expand docs
  • Loading branch information
nyalldawson committed Aug 8, 2021
1 parent 93d4d9c commit 17fa482
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/core/auto_generated/providers/qgsprovidermetadata.sip.in
Expand Up @@ -300,12 +300,23 @@ The default method returns ``False`` for all URIs.
Given a ``uri``, returns any sidecar files which are associated with the URI and this
provider.

In this context a sidecar file is defined as a file which shares the same base filename
as a dataset, but which differs in file extension. It defines the list of additional
files which must be renamed or deleted alongside the main file associated with the
dataset in order to completely rename/delete the dataset.

For instance, the OGR provider would return the corresponding .dbf, .idx, etc files for a
uri pointing at a .shp file.

Implementations should files any files which MAY exist for the URI, and it is up to the caller
to filter these to only existing files if required.

.. note::

Some file formats consist of a set of static file names, such as ESRI aigrid datasets
which consist of a folder with files with the names "hdr.adf", "prj.adf", etc. These statically
named files are NOT considered as sidecar files.

.. versionadded:: 3.22
%End

Expand Down
9 changes: 9 additions & 0 deletions src/core/providers/qgsprovidermetadata.h
Expand Up @@ -358,12 +358,21 @@ class CORE_EXPORT QgsProviderMetadata : public QObject
* Given a \a uri, returns any sidecar files which are associated with the URI and this
* provider.
*
* In this context a sidecar file is defined as a file which shares the same base filename
* as a dataset, but which differs in file extension. It defines the list of additional
* files which must be renamed or deleted alongside the main file associated with the
* dataset in order to completely rename/delete the dataset.
*
* For instance, the OGR provider would return the corresponding .dbf, .idx, etc files for a
* uri pointing at a .shp file.
*
* Implementations should files any files which MAY exist for the URI, and it is up to the caller
* to filter these to only existing files if required.
*
* \note Some file formats consist of a set of static file names, such as ESRI aigrid datasets
* which consist of a folder with files with the names "hdr.adf", "prj.adf", etc. These statically
* named files are NOT considered as sidecar files.
*
* \since QGIS 3.22
*/
virtual QStringList sidecarFilesForUri( const QString &uri ) const;
Expand Down

0 comments on commit 17fa482

Please sign in to comment.