# UrlReadFileSystem

Class · implements [`ReadFileSystem`](https://api.playcanvas.com/splat-transform/interfaces/ReadFileSystem.md)

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/io/read/url-file-system.ts#L265

ReadFileSystem for reading from URLs using fetch.
Supports optional base URL for relative paths.

Automatically detects whether the server supports Range requests.
If Range requests are supported, uses streaming with Range headers for efficient seeking.
If not supported (e.g., Python's SimpleHTTPRequestHandler), falls back to downloading
the entire file into memory first.

## Constructors

### constructor

```ts
new UrlReadFileSystem(baseUrl?: string)
```

**Parameters**

- `baseUrl` (`string`, optional, default `''`): Optional base URL to prepend to filenames

## Methods

### createSource

```ts
createSource(filename: string, progress?: ProgressCallback): Promise<ReadSource>
```

Create a readable source for the given path/identifier.

**Parameters**

- `filename` (`string`): Path or identifier for the resource
- `progress` ([`ProgressCallback`](https://api.playcanvas.com/splat-transform/types/ProgressCallback.md), optional): Optional callback for progress reporting

**Returns** `Promise<`[`ReadSource`](https://api.playcanvas.com/splat-transform/interfaces/ReadSource.md)`>`: Promise resolving to a ReadSource
