MCPcopy Index your code
hub / github.com/NativeScript/firebase / Reference

Class Reference

packages/firebase-storage/index.android.ts:364–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364export class Reference implements IReference {
365 _native: com.google.firebase.storage.StorageReference;
366
367 static fromNative(value: com.google.firebase.storage.StorageReference) {
368 if (value instanceof com.google.firebase.storage.StorageReference) {
369 const ref = new Reference();
370 ref._native = value;
371 return ref;
372 }
373 return null;
374 }
375
376 get native() {
377 return this._native;
378 }
379
380 get android() {
381 return this.native;
382 }
383
384 get bucket(): string {
385 return this.native?.getBucket?.();
386 }
387
388 get fullPath(): string {
389 return this.native?.getPath?.();
390 }
391
392 get name(): string {
393 return this.native?.getName?.();
394 }
395
396 get parent(): Reference {
397 return Reference.fromNative(this.native.getParent?.());
398 }
399
400 get root(): Reference {
401 return Reference.fromNative(this.native.getRoot?.());
402 }
403
404 get storage() {
405 return Storage.fromNative(this.native.getStorage());
406 }
407
408 child(path: string): Reference {
409 return Reference.fromNative(this.native.child(path));
410 }
411
412 delete(): Promise<void> {
413 return new Promise((resolve, reject) => {
414 org.nativescript.firebase.storage.FirebaseStorage.StorageReference.delete(
415 this.native,
416 new org.nativescript.firebase.storage.FirebaseStorage.Callback<java.lang.Void>({
417 onError(param0) {
418 reject(FirebaseError.fromNative(param0));
419 },
420 onSuccess(param0) {
421 resolve();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…