如何在 Objective-C 中的同一位置重命名或更改文件名大小写

发布于 2024-09-02 17:09:59 字数 345 浏览 0 评论 0原文

我正在开发需要我更改文件名大小写并保留原始文件名的应用程序 例如:需要更改 abc.txt => (ABC.txt 或 Abc.txt 或 abc.TXT 或 abc.Txt)文件名及其扩展名可以以相同的方式更改。我尝试使用 NSFileManager

- (BOOL)movePath:(NSString *)source toPath:(NSString *)destination handler:(id)handler

但它没有改变大小写,请让我知道如何仅在 Objective-C 或 C 函数中更改文件名或扩展名大小写,如果它可以在 Objective-C 中使用。

谢谢,

I am working on application which required me to change the filename case retaining the original filename as it is For Example: need to change abc.txt => (ABC.txt or Abc.txt or abc.TXT or abc.Txt) filename as well as its extension can be change in same way. I tried to use the NSFileManager

- (BOOL)movePath:(NSString *)source toPath:(NSString *)destination handler:(id)handler

But it didn't change the case,Please let me know how i can change the filename or extension case only in objective-c or c function, if it can be use in objective-c.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文