Renaming an existing file with Obj-C

前端 未结 2 1775
无人及你
无人及你 2021-01-12 08:26

I\'ve seen this question asked a few times but I have been unable thus far to achieve success using any of the post solutions. What I am trying to do is rename a file in the

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-12 09:21

    NSError *error = nil;
    [[NSFileManager defaultManager] moveItemAtPath:initPath toPath:newPath error:&error];
    

提交回复
热议问题