//根据文件名来获取文件路径  doucument
- (NSString *)dataFilePath:(NSString *)sender {
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,
YES);
NSString *documentDirectory = [path objectAtIndex:0];
return [documentDirectory stringByAppendingPathComponent:sender];
}

 

NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:filename]; //资源目录

 

NSArray *cache = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);     //caches目录
NSString *cachePath = [cache objectAtIndex:0] ;

NSString *voiceName = [cachePath stringByAppendingPathComponent:[sender stringByAppendingString:@".wav"]];




相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-01-22
  • 2022-01-31
  • 2022-12-23
猜你喜欢
  • 2021-05-26
  • 2021-06-09
  • 2022-01-17
  • 2021-11-18
  • 2021-09-03
  • 2022-12-23
  • 2022-01-17
相关资源
相似解决方案