@@ -36,30 +36,30 @@ export class SAFDocumentFile implements FileObject {
3636 } ) ;
3737 }
3838
39- async isMyChild ( fileObject : FileObject ) : Promise < boolean > {
40- if ( ! ( fileObject instanceof SAFDocumentFile ) ) {
41- console . log ( `[isMyChild] Not an SAFDocumentFile` ) ;
42- return false ;
43- }
44-
45- try {
46- console . log ( `[isMyChild] Checking if ${ fileObject . uri } is a child of ${ this . uri } ` ) ;
47- const result = await this . execPlugin ( "isMyChild" , [ fileObject . uri ] ) ;
48-
49- // result will be 1 or 0 (from the native plugin)
50- const isChild = result === 1 || result === true ;
39+ async isMyChild ( fileObject : FileObject ) : Promise < boolean > {
40+ if ( ! ( fileObject instanceof SAFDocumentFile ) ) {
41+ console . log ( `[isMyChild] Not an SAFDocumentFile` ) ;
42+ return false ;
43+ }
5144
52- console . log ( `[isMyChild] Result from native =` , isChild ) ;
53- return isChild ;
54- } catch ( err ) {
55- console . error ( `[isMyChild] Error:` , err ) ;
56- return false ;
57- }
58- }
45+ try {
46+ console . log (
47+ `[isMyChild] Checking if ${ fileObject . uri } is a child of ${ this . uri } ` ,
48+ ) ;
49+ const result = await this . execPlugin ( "isMyChild" , [ fileObject . uri ] ) ;
5950
51+ // result will be 1 or 0 (from the native plugin)
52+ const isChild = result === 1 || result === true ;
6053
54+ console . log ( `[isMyChild] Result from native =` , isChild ) ;
55+ return isChild ;
56+ } catch ( err ) {
57+ console . error ( `[isMyChild] Error:` , err ) ;
58+ return false ;
59+ }
60+ }
6161
62- async canRead ( ) : Promise < boolean > {
62+ async canRead ( ) : Promise < boolean > {
6363 const stat = await this . stat ( ) ;
6464 return ! ! stat . canRead ;
6565 }
0 commit comments