/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. #import "BEE/BEE.h"
  3. @implementation BEEDirectory
  4. - (id)init
  5. {
  6. self = [super init];
  7. return self;
  8. }
  9. - (void)dealloc
  10. {
  11. [super dealloc];
  12. }
  13. - (void)setPath:(NSString *)path
  14. {
  15. BOOL isDir = YES;
  16. if([[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDir] && !isDir)
  17. {
  18. [NSException raise:NSGenericException
  19. format:@"I want be a directory not a file"];
  20. }
  21. [super setPath:path];
  22. }
  23. @end /* BEEDirectory */