FileModel.m 714 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // FileModel.m
  3. // zhuxun
  4. //
  5. // Created by winsoft on 16/7/19.
  6. //
  7. //
  8. #import "FileModel.h"
  9. #import "PhotosCache.h"
  10. @implementation FileModel
  11. - (void)setFileName:(NSString *)fileName
  12. {
  13. _fileName = fileName;
  14. if ([fileName containsString:@"."]) {
  15. _fileType = [fileName componentsSeparatedByString:@"."].lastObject;
  16. }
  17. }
  18. - (void)setFileLocalPath:(NSString *)fileLocalPath
  19. {
  20. _fileLocalPath = fileLocalPath;
  21. if (self.birefFileType == BriefFileTypePic) {
  22. _fileFullLocalPath = [NSString stringWithFormat:@"%@/%@",PhotosMessageDir,fileLocalPath];
  23. }else _fileFullLocalPath = [NSString stringWithFormat:@"%@/%@",FileFolderFullRouter,fileLocalPath];
  24. }
  25. @end