MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getFileName

Function getFileName

packages/core/image-source/index.ios.ts:486–493  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

484}
485
486function getFileName(path: string): string {
487 let fileName = typeof path === 'string' ? path.trim() : '';
488 if (fileName.indexOf('~/') === 0) {
489 fileName = fsPath.join(knownFolders.currentApp().path, fileName.replace('~/', ''));
490 }
491
492 return fileName;
493}
494
495function getImageData(instance: UIImage, format: 'png' | 'jpeg' | 'jpg', quality = 0.9): NSData {
496 return NativeScriptUtils.getImageDataFormatQuality(instance, format, quality);

Callers 2

fromFileSyncMethod · 0.85
fromFileMethod · 0.85

Calls 3

indexOfMethod · 0.80
joinMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected