- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
如果文件名由正斜杠组成,如“te/st.pdf”
[data writeToFile:@"/Documents/te/st.pdf" atomically:YES encoding:NSUTF8StringEncoding error:nil]
是否有任何解决方案而不是用其他字符替换正斜杠“/”。
最佳答案
出于某些奇怪的原因,你必须使用 \:
所以它会是
[data writeToFile:@"/Documents/te\:st.pdf" atomically:YES encoding:NSUTF8StringEncoding error:nil]
它可以工作,但编译器会提示未知的转义序列。如果您在使用正斜杠创建文件的文件夹中执行 ls -la
,您会看到它被命名为 the:st.pdf
关于iphone - 崩溃 : if the file name consists forward slash like "te/st.pdf",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19833372/
首先,我想补充一点,我认为这是一个错误。我正在尝试将占位符添加到 jqueryte像here 。 但它根本不使用 $().jqte({placeholder: "myplaceholder"}); 来
当我对输出进行类型转换时,我观察到一个有趣的结果: 这是代码片段: int bitSize = (int)log10(1.0*16)/log10(2.0); //bistsize = 3 it
我正在考虑选择一个 html 编辑器。我试过 jHtmlArea ( thinking 它是 JQueryTE。 无论如何,我也尝试了使用简单的 JQuery TE,只需调用 jqte()。 但是我似
.surveyform-class { background: yellow; margin: 0 25%; width: 50%; border-right: 40px so
我正在尝试一些关于字符串池的性能基准。然而,结果并非预期。 我做了3个静态方法 perform0() 方法...每次创建一个新对象 perform1() 方法 ... 字符串文字“Test” perf
这个问题在这里已经有了答案: adding touch listener for liner layout filled with buttons (2 个答案) 关闭 8 年前。 我有这样的布局。
我有一个客户端向服务器执行非常繁重的请求,服务器成功完成请求,但在成功之前浏览器收到 504 GATEWAY TIMEOUT...我怎样才能让浏览器等待服务器响应? 最佳答案 浏览器将等待多长时间,服
我想在 linux 终端上使用 sed 命令高亮显示 C 程序的函数名称。 我可以使用 tput 为函数名称着色。为此,我提供了以下代码。 (第一行) 如果我使用 printf/echo/命令替换为终
事实上,我正在使用一个对象来存储我的表单收集的所有数据。在这个对象中,我有一个数组,我发现更新它的唯一解决方案是创建一个函数,将每个输入添加到一个数组中,然后设置:this.setState({ 'i
我正在尝试使用 RSpec 和 Capybara 编写测试,但是,我总是收到以下错误: No route matches [GET] "/semead/assets/application-7a2cf
我正在使用 jQuery TE 进行文本格式化。我在文本编辑器中输入一些文本并执行一些操作,例如粗体、斜体、有序列表、文本标题和格式设置。一旦我完成文本格式设置。 我需要点击提交按钮。单击提交按钮后,
当此计数器被另一个计时器事件(stop_future)中断并完成时,我无法清除下面的 count_timer( sleep )。 import asyncio import datetime from
如果文件名由正斜杠组成,如“te/st.pdf” [data writeToFile:@"/Documents/te/st.pdf" atomically:YES encoding:NSUTF8Str
我在一家广播电台工作,所以我制作了该广播电台播放轨道的播放列表,您可以在这里找到它 -> http://www.facebook.com/QmusicNL?sk=app_258630990850514
我是一名优秀的程序员,十分优秀!