NSFileManager: removing item

前端 未结 3 1921
没有蜡笔的小新
没有蜡笔的小新 2021-01-28 23:36

The problem is removing an item that´s been written using writeToFile: method, I cannot seem to remove it. I tried NSFileManager but I guess these are two different

3条回答
  •  -上瘾入骨i
    2021-01-29 00:21

    And the "for some reason": your "URL" is just a path, it's not a valid filesystem URL. For that, you would need to prepend file:// before the actual path, or even better, use [NSURL fileURLWithPath:].

提交回复
热议问题