Class ResourceDescriptor
Implements
- ResourceMetaData
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
- new ResourceDescriptor(
resource: null | WebHareBlob,
metadata: ResourceMetaDataInit,
): ResourceDescriptorParameters
- resource: null | WebHareBlob
- metadata: ResourceMetaDataInit
Returns ResourceDescriptor
Properties
[ Marshaller]
"[Marshaller]": {
setValue: (this: ResourceDescriptor, value: HSVMVar) => void;
type: HareScriptType;
} = ...
setValue: (this: ResourceDescriptor, value: HSVMVar) => void;
type: HareScriptType;
} = ...
Accessors
db Loc
- get dbLoc(): undefined | { cc: number; id: number; source: number }
Returns undefined | { cc: number; id: number; source: number }
- undefined
- { cc: number; id: number; source: number }
cc: number
Creation check. Type-specific identifier to protect against replays if an ID is reused
id: number
ID
source: number
Source. 1 = fsobjects, 2 = fssettings, 3 = wrdsetting, 4 = formresult
dominant Color
- get dominantColor(): null | string
Returns null | string
extension
- get extension(): null | string
Returns null | string
file Name
- get fileName(): null | string
Returns null | string
hash
- get hash(): null | string
Returns null | string
height
- get height(): null | number
Returns null | number
media Type
- get mediaType(): string
Returns string
mirrored
- get mirrored(): null | boolean
Returns null | boolean
ref Point
- get refPoint(): null | { x: number; y: number }
Returns null | { x: number; y: number }
- set refPoint(refPoint: null | { x: number; y: number }): void
Parameters
- refPoint: null | { x: number; y: number }
Returns void
resource
Returns WebHareBlob
rotation
- get rotation(): null | Rotation
Returns null | Rotation
source File
- get sourceFile(): null | number
Returns null | number
width
- get width(): null | number
Returns null | number
Methods
clone
Parameters
Optional
options: ResourceScanOptions
Returns Promise<ResourceDescriptor>
export
Parameters
Optional
options: ExportOptions
Returns Promise<ExportedResource>
get Meta Data
Returns ResourceMetaData
to Link
Parameters
Optional
method: LinkMethod
Returns string
to Resized
Parameters
- method: ResizeMethod
Returns { link: string }
Static
from
- from(
str: string | Buffer<ArrayBufferLike> | WebHareBlob,
options?: ResourceScanOptions,
): Promise<ResourceDescriptor>Parameters
- str: string | Buffer<ArrayBufferLike> | WebHareBlob
Optional
options: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Static
from Blob
Copies the blob to a new WebHareBlob
Parameters
- str: Blob | File
Optional
options: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Static
from Disk
Parameters
- path: string
Optional
options: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Static
from Resource
Parameters
- resource: string
Optional
options: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Static
import
Parameters
- resource: ExportedResource
Returns Promise<ResourceDescriptor>
Database location support cached URL generation