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

Method fromFileSync

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

Source from the content-addressed store, hash-verified

137 }
138
139 static fromFileSync(path: string): ImageSource {
140 const uiImage = UIImage.imageWithContentsOfFile(getFileName(path));
141
142 return uiImage ? new ImageSource(uiImage) : null;
143 }
144 static fromFile(path: string): Promise<ImageSource> {
145 return new Promise<ImageSource>((resolve, reject) => {
146 try {

Callers 14

loadFromFileMethod · 0.45
fromFileFunction · 0.45
testSaveToFileFunction · 0.45
testNativeFieldsFunction · 0.45
testBase64Encode_PNGFunction · 0.45
testBase64Encode_JPEGFunction · 0.45
testResizeFunction · 0.45

Calls 1

getFileNameFunction · 0.85

Tested by

no test coverage detected