-
Notifications
You must be signed in to change notification settings - Fork 5
/
NSFileManager+Utils.h
executable file
·41 lines (34 loc) · 1.13 KB
/
NSFileManager+Utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// NSFileManager+Utils.h
// PermanentEraser
//
// Created by Chad Armstrong on 12/2/10.
// Copyright 2010 Edenwaith. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <paths.h>
#include <sys/param.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/IOBSD.h>
#include <IOKit/storage/IOBlockStorageDevice.h>
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/Kext/KextManager.h>
#ifndef kIOPropertyMediumTypeKey
#define kIOPropertyMediumTypeKey "Medium Type"
#endif
@interface NSFileManager (Utils)
- (BOOL) createDirectoryAtPathWithIntermediateDirectories: (NSString *) path attributes: (NSDictionary *) attributes;
- (BOOL) isFileSymbolicLink: (NSString *) path;
- (BOOL) containsResourceFork: (NSString *)path;
- (FSRef) convertStringToFSRef: (NSString *) path;
- (unsigned long long) fileSize: (NSString *) path;
- (unsigned long long) fastFolderSizeAtFSRef:(FSRef*)theFileRef;
- (NSString *) formatFileSize: (double) file_size;
- (BOOL) isSolidState: (UInt8 const *) cpath;
- (BOOL) isDirectoryEmpty: (NSString *) path;
@end