[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [seismic](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.seismic) / [data](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.seismic#data) / [BrowserLocalFile](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.seismic#browserlocalfile) / LocalFile

# Class: LocalFile

[data](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.seismic#data).[BrowserLocalFile](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.seismic#browserlocalfile).LocalFile

Creates wrapper class for a file reader.

## Table of contents

Constructors
- [new LocalFile(file)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.seismic.data-3.browserlocalfile.localfile.md#new localfile(file))


Methods
| [getFileName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.seismic.data-3.browserlocalfile.localfile#getfilename) | [getFileSize](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.seismic.data-3.browserlocalfile.localfile#getfilesize) | [getLastModified](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.seismic.data-3.browserlocalfile.localfile#getlastmodified) |
|  --- | --- | --- |
| [readBinarySection](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.seismic.data-3.browserlocalfile.localfile#readbinarysection) | [isSupported](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.seismic.data-3.browserlocalfile.localfile#issupported) |


## Contents

Constructors
#### new LocalFile(file)

• **new LocalFile**(`file`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `file` | `string` | `File` | the local file for e.g SEG-Y file. |


Methods
#### getFileName

▸ **getFileName**(): `string`

Returns file name

#### Returns

`string`

file name

#### getFileSize

▸ **getFileSize**(): `number`

Return file size

#### Returns

`number`

#### getLastModified

▸ **getLastModified**(): `number`

Returns the last modified date of the file as the number of milliseconds
since the Unix epoch (January 1, 1970 at midnight). Files without
a known last modified date return the current date.

#### Returns

`number`

#### readBinarySection

▸ **readBinarySection**(`callback`, `from`, `to`): `void`

Returns binary raw data

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `callback` | (`res`: `string` | `ArrayBuffer`) => `void` | this is the function called when data is ready |
| `from` | `number` | offset in bytes |
| `to` | `number` | offset in bytes |


#### Returns

`void`

#### isSupported

▸ `Static` **isSupported**(): `boolean`

Return true if local file is supported

#### Returns

`boolean`