Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (20 sloc) 0.568 kb
//
// Dot.m
// quicklook-dot
//
// Created by Besi on 09.03.11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "Dot.h"
@implementation Dot
+(NSData *)dataFromDotFile: (NSURL *) dotFile
{
NSPipe *pipe = [NSPipe pipe];
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath: @"/usr/bin/env"];
[task setArguments: [NSArray arrayWithObjects: @"dot", [dotFile path], @"-Tpng", nil]];
[task setStandardOutput: pipe];
[task launch];
return [[pipe fileHandleForReading] readDataToEndOfFile];
}
@end
Jump to Line
Something went wrong with that request. Please try again.