// // CCFileName.h // CCFC // // Created by xichen on 11-12-23. // Copyright 2011 ccteam. All rights reserved. // #import <Foundation/Foundation.h> @interface CCFileName : NSObject { @private NSString *_fileName; } @property(nonatomic, copy) NSString *fileName; - (id)initWithFileName:(NSString *)fileName; - (void)dealloc; // get the extend name of the fileName, xichen.txt, then returns txt - (NSString *)getExtendName; // get the main file name of the fileName, xichen.txt, then returns xichen - (NSString *)getMainName; @end
googlecode链接地址(会有更新):http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCFileName.h
本文介绍了一个用于处理文件名的Objective-C类CCFileName。该类提供初始化文件名的方法,并支持获取文件扩展名及主文件名的功能。适用于需要解析文件名的应用场景。
85

被折叠的 条评论
为什么被折叠?



