| Qore FileLocationHandler Module Reference 2.1

FileLocationHandler Module

# Introduction to the FileLocationHandler Module

The FileLocationHandler module provides an API for returning file data based on a URL-like location string.

To retrieve file data, call one of:

- FileLocationHandler::getTextFileFromLocation()
- FileLocationHandler::getBinaryFileFromLocation()
- FileLocationHandler::getStreamReaderFromLocation()
- FileLocationHandler::getBinaryStreamFromLocation()

To write file data, call one of:

- FileLocationHandler::writeFileToLocation()
- FileLocationHandler::getOutputStreamForLocation()

To register a location handler based on a scheme, call:

- FileLocationHandler::registerHandler()

This module provides the following classes:

- AbstractFileLocationHandler: the abstract API class
- FileLocationHandler: the main API class
- FileLocationHandlerData: class handling `"data://"` locations (immedidate data in the location URL)
- FileLocationHandlerFile: class handling `"file://"` locations (the default if no scheme is present in the location string)
- FileLocationHandlerFtp: class handling `"ftp://"` and `"ftps://"` locations
- FileLocationHandlerHttp: class handling `"http://"` and `"https://"` locations
- FileLocationHandlerSftp: class handling `"sftp://"` locations
- OutputStreamWrapper: output stream wrapper class for handling background I/O operations

# Release Notes

## FileLocationHandler v2.1

- added support for immediate `data://` locations (issue 4626)

## FileLocationHandler v2.0

- updated for read/write operations and added streaming APIs (issue 4424)

## FileLocationHandler v1.0

- initial release of the module