HistoryView: Don't show the 'loading commit' thing until after 500 ms.
[GitX.git] / PBEasyFS.m
blobed9c30b6dd0d97c58b4d9d9317a49f11069a1d1e
1 //
2 //  PBEasyFS.m
3 //  GitX
4 //
5 //  Created by Pieter de Bie on 6/17/08.
6 //  Copyright 2008 __MyCompanyName__. All rights reserved.
7 //
9 #import "PBEasyFS.h"
12 @implementation PBEasyFS
14 + (NSString*) tmpNameWithSuffix: (NSString*) path
16         NSString* newName = [NSString stringWithFormat: @"%@/XXXXXX%@", NSTemporaryDirectory(), path];
17         char *template = (char*) [newName fileSystemRepresentation];
18         int fd = mkstemps(template, [path length]);
19         close(fd);
20         return [NSString stringWithUTF8String:template];
23 + (NSString*) tmpDirWithPrefix: (NSString*) path
25         NSString* newName = [NSString stringWithFormat: @"%@%@.XXXXXX", NSTemporaryDirectory(), path];
26         char *template = (char*) [newName fileSystemRepresentation];
27         template = mkdtemp(template);
28         return [NSString stringWithUTF8String:template];
31 @end