PageRenderTime 27ms CodeModel.GetById 12ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

/BEE.framework/BEE/BEEDirectory.m

http://eeframework.googlecode.com/
Objective C | 33 lines | 22 code | 10 blank | 1 comment | 2 complexity | 43561475d51d1bb74a37c69d37aa0236 MD5 | raw file
 1// -*- objc -*-
 2
 3#import "BEE/BEE.h"
 4
 5@implementation BEEDirectory
 6
 7- (id)init
 8{
 9  self = [super init];
10  
11  return self;
12}
13
14- (void)dealloc
15{
16  [super dealloc];
17}
18
19- (void)setPath:(NSString *)path
20{
21  BOOL isDir = YES;
22
23  if([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDir] && !isDir)
24    {
25      [NSException raise:NSGenericException 
26		   format:@"I want be a directory not a file"];
27    }
28
29  [super setPath:path];
30}
31
32
33@end /* BEEDirectory */