Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit fa5a1b9

Browse files
committed
Notify any subscribers if a local path is unlinked
1 parent 26f672d commit fa5a1b9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/FileSystem.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,15 @@ export class FileSystem {
397397

398398
try {
399399
await RNFSUnlinkIfExists(pathLib.resolve(this.baseFilePath + path))
400+
401+
const obs$ = FileSystem.cacheObservables[path]
402+
if (obs$) {
403+
obs$.next({
404+
path: null,
405+
fileName: path,
406+
})
407+
}
408+
400409
return true
401410
} catch (error) {
402411
return false

0 commit comments

Comments
 (0)