从数据库永久删除文件ios [英] delete files from database permanently ios

查看:105
本文介绍了从数据库永久删除文件ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是制作录音机(m4a扩展文件)。我给给录音文件的输出一个特定的URL(在目录中)。
我能够播放它,保存文件在数据库中的路径,并可以稍后检索。事情正在进行。但我无法删除保存/未保存的文件。每次我录制一个音频,该文件正在占据一个永久的空间。无法删除它们。

I am Making an Audio recorder(m4a extension files). I am Giving a particular URL for the output of the recorded File(in directory). I am able to play it, save the path of the file in database and can retrieve it later. EVery thing is going Fine. BUT I am not able to delete the saved/unsaved files. Every time I record an audio , the file is taking a permanent space. Am not able to delete them.

我尝试过互联网(stackoverflow ofcourse)。我得到这样的链接: 我有视频网址,并希望使用此UR1从iPhone中删除

I tried it over internet(stackoverflow ofcourse). I got Links like this: I have video URL and want to delete it from the iPhone using this URl

strong> COCOA ERROR 4 时,我试图使用如下代码删除它们:[[NSFileManager defaultManager] removeItemAtPath:strPath错误:&错误];

But they are showing COCOA ERROR 4 when ever i try to delete them using codes like this: [[NSFileManager defaultManager] removeItemAtPath:strPath error:&error];

请建议,并回复

推荐答案

这是早期路径 无法写入文件

/ var / mobile / Applications / 8584F54E-75D2-4833-8826-29C125E53DBC / /291013193758w.png

今天早上,我再次运行我的代码。现在显示路径

This morning, I just run my code once again ,. now its showing path

/var/mobile/Applications/DDA14123-6A88-4756-B2E4-C4A3AA39AA5B/Documents/291013081335test.png

在此路径上能够写入我的文件

两个路径之间的差异是第一个是图书馆/文档,其中作为第二个文档

the Difference between two paths is that, first one is of Library/Documentation , where as second one is of Documents

知道差异,但它现在正在工作

这篇关于从数据库永久删除文件ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆