How to create TFENode from path?
EDIT:
I'm a little more complicated, there is a method in TGlobalWindowController:
struct TString {
struct TRef<const __CFString *, TRetainReleasePolicy<CFStringRef>> fString;
};
...
+ (struct TFENode)nodeForUrl:(const struct TString *)arg1;
Sorry, I can not create TString.
EDIT2:
After researching, I found out that this method works:
struct TString {
CFStringRef fString;
};
NSString *path = [[NSString alloc] initWithString:@"file:///"];
struct TString *tstr = (struct TString *)malloc(sizeof(struct TString*));
tstr->fString = (CFStringRef)path;
id node = [NSClassFromString(@"TGlobalWindowController") performSelector:NSSelectorFromString(@"nodeForUrl:") withObject:(id)tstr];
free(tstr);
[path release];
node is correct, but the crawler will work as soon as the next garbage collection process begins.
source
share