GeoprocessingDataFile

A data file input or output parameter. Corresponds to GPDataFile parameter type on the service.

Since

200.1.0

See also

GeoprocessingDataFile.GeoprocessingDataFile

(String)

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The input file path of this parameter. This should be the location on disk of a file that will be uploaded to the server that the geoprocessing task will run on. This is only for input parameters. Setting this will override a URL set with GeoprocessingDataFile.url. Note that this property will be ignored if uploadId is set.

Link copied to clipboard

The upload item id of this parameter. This should be the item id of an item in the geoprocessing service's uploads resource. This is only for input parameters. This will be the upload id of an item previously uploaded to the server. Note that if this property is set it will cause both the inputFilePath and URL properties to be ignored.

Link copied to clipboard
var url: String?

The URL of this parameter. This will be the location of the data file for an input parameter. This is only for input parameters to a URL containing the input data file. Ensure this URL accessible to the service. A geoprocessing service can have an uploads rest resource associated with it for placing inputs.

Functions

Link copied to clipboard
suspend fun fetchFile(filePath: String): Result<String>

Fetches the data file at the URL in the GeoprocessingDataFile.url property. If filePath is a directory, the file will be given the name of the file taken from the end of the GeoprocessingDataFile.url. The full file path will be available as the returned task's result. Alternatively filePath can be a destination filename within an existing directory. Note that any pre-existing file at that location with the same name will be deleted first.