mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-27 19:20:55 +00:00
36 lines
655 B
Objective-C
36 lines
655 B
Objective-C
#import "SWGFile.h"
|
|
|
|
@implementation SWGFile
|
|
|
|
- (id) init {
|
|
self = [super init];
|
|
return self;
|
|
}
|
|
|
|
- (id) initWithNameData: (NSString*) filename
|
|
mimeType: (NSString*) fileMimeType
|
|
data: (NSData*) data {
|
|
self = [super init];
|
|
if(self) {
|
|
_name = filename;
|
|
_mimeType = fileMimeType;
|
|
_data = data;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (id) initWithPath:(NSString *)filepath data:(NSData *)data name:(NSString *)filename {
|
|
self = [super init];
|
|
|
|
if (self) {
|
|
_name = filename;
|
|
_data = data;
|
|
_path = filepath;
|
|
[data writeToFile:_path atomically:YES];
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
@end
|