src/ios/CDVFile.m [197:237]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (void)registerFilesystem:(NSObject<CDVFileSystem> *)fs {
    __weak CDVFile* weakSelf = self;
    SEL sel = NSSelectorFromString(@"urlTransformer");
    // for backwards compatibility - we check if this property is there
    // we create a wrapper block because the urlTransformer property
    // on the commandDelegate might be set dynamically at a future time
    // (and not dependent on plugin loading order)
    if ([self.commandDelegate respondsToSelector:sel]) {
        fs.urlTransformer = ^NSURL*(NSURL* urlToTransform) {
            // grab the block from the commandDelegate
            NSURL* (^urlTransformer)(NSURL*) = ((id(*)(id, SEL))objc_msgSend)(weakSelf.commandDelegate, sel);
            // if block is not null, we call it
            if (urlTransformer) {
                return urlTransformer(urlToTransform);
            } else { // else we return the same url
                return urlToTransform;
            }
        };
    }
    [fileSystems_ addObject:fs];
}

- (NSObject<CDVFileSystem> *)fileSystemByName:(NSString *)fsName
{
    if (self.fileSystems != nil) {
        for (NSObject<CDVFileSystem> *fs in self.fileSystems) {
            if ([fs.name isEqualToString:fsName]) {
                return fs;
            }
        }
    }
    return nil;
}

- (NSObject<CDVFileSystem> *)filesystemForURL:(CDVFilesystemURL *)localURL {
    if (localURL.fileSystemName == nil) return nil;
    @try {
        return [self fileSystemByName:localURL.fileSystemName];
    }
    @catch (NSException *e) {
        return nil;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/osx/CDVFile.m [189:230]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (void)registerFilesystem:(NSObject<CDVFileSystem> *)fs {
    __weak CDVFile* weakSelf = self;
    SEL sel = NSSelectorFromString(@"urlTransformer");
    // for backwards compatibility - we check if this property is there
    // we create a wrapper block because the urlTransformer property
    // on the commandDelegate might be set dynamically at a future time
    // (and not dependent on plugin loading order)
    if ([self.commandDelegate respondsToSelector:sel]) {
        fs.urlTransformer = ^NSURL*(NSURL* urlToTransform) {
            // grab the block from the commandDelegate
            NSURL* (^urlTransformer)(NSURL*) = ((id(*)(id, SEL))objc_msgSend)(weakSelf.commandDelegate, sel);
            // if block is not null, we call it
            if (urlTransformer) {
                return urlTransformer(urlToTransform);
            } else { // else we return the same url
                return urlToTransform;
            }
        };
    }
    [fileSystems_ addObject:fs];
}

- (NSObject<CDVFileSystem> *)fileSystemByName:(NSString *)fsName
{
    if (self.fileSystems != nil) {
        for (NSObject<CDVFileSystem> *fs in self.fileSystems) {
            if ([fs.name isEqualToString:fsName]) {
                return fs;
            }
        }
    }
    return nil;

}

- (NSObject<CDVFileSystem> *)filesystemForURL:(CDVFilesystemURL *)localURL {
    if (localURL.fileSystemName == nil) return nil;
    @try {
        return [self fileSystemByName:localURL.fileSystemName];
    }
    @catch (NSException *e) {
        return nil;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



