获取文件的修改时间

	NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];  
	[formatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];  
		NSDictionary* fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[NSString stringWithFormat:@"%@/%@",kNotUploadXmlFolder, fileName] 
																						error:nil];
		NSDate* fileModifyDate = [fileAttributes objectForKey:NSFileModificationDate];
 
		
		NSString* fileModityDateString=[formatter stringFromDate: fileModifyDate];  
 

你可能感兴趣的:(文件)