{
// 判断存放音频、视频的文件夹是否存在,不中和蠢存在则卖陪创建棚基对应文件夹
NSFileManager *fileManager = [NSFileManagerdefaultManager]
BOOL isDir = FALSE
BOOL isDirExist = [fileManager fileExistsAtPath:DOCUMENTS_FOLDER_AUDIOisDirectory:&isDir]
if(!(isDirExist &&isDir))
{
BOOL bCreateDir = [fileManager createDirectoryAtPath:DOCUMENTS_FOLDER_AUDIOwithIntermediateDirectories:YESattributes:nilerror:nil]
if(!bCreateDir){
NSLog(@"Create Audio Directory Failed.")
}
NSLog(@"%@",DOCUMENTS_FOLDER_AUDIO)
}
isDir = FALSE
isDirExist = [fileManager fileExistsAtPath:DOCUMENTS_FOLDER_VEDIOisDirectory:&isDir]
if(!(isDirExist &&isDir)){
BOOL bCreateDir = [fileManager createDirectoryAtPath:DOCUMENTS_FOLDER_VEDIOwithIntermediateDirectories:YESattributes:nilerror:nil]
if(!bCreateDir){
NSLog(@"Create Audio Directory Failed.")
}
NSLog(@"%@",DOCUMENTS_FOLDER_VEDIO)
}
}
用cp命令冲汪!给你举个例子吧!把/home/a下的所有岩判扒文件拷贝到/usr/local/src下:
cp /home/a/* /usr/粗昌local/src/a
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)