Last updated

API / geotoolkit / seismic / data / BrowserLocalFile / LocalFile

Class: LocalFile

data.BrowserLocalFile.LocalFile

Creates wrapper class for a file reader.

Table of contents

Constructors
Methods

Contents

Constructors

new LocalFile(file)

new LocalFile(file)

Parameters

Name Type Description
filestring | Filethe 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) => voidthis is the function called when data is ready
fromnumberoffset in bytes
tonumberoffset in bytes

Returns

void


isSupported

Static isSupported(): boolean

Return true if local file is supported

Returns

boolean