English 中文(简体)
• 如何将一条通道改道,改道至捷克斯洛伐克联邦共和国和联邦苏维埃社会主义共和国*
原标题:how to convert a path in NSString to CFURLRef and to FSRef*

I need to use several functions requiring CFURLRef and FSRef* and for the moment I just have a path stored in an NSString. What is the (most efficient) way to perform this conversion?

事先感谢您的帮助,

最佳回答

一条道路可以通过使用NSURL轻易转化为CFURL,而NSURL是免费的桥梁。 另外,还有一项欧洲工联的职能,将给你一个联邦工党。 鉴于国家卫生局的名称是Path,该法典将给你。

CFURLRef url = (CFURLRef)[NSURL fileURLWithPath:thePath];
FSRef fileRef;
CFURLGetFSRef(url, &fileRef);

如果您已经有一个有效的密码,你可以直接通过该密码

问题回答

暂无回答




相关问题
How can I load a folders files into a ListView?

I d like to have a user select a folder with the FolderBrowserDialog and have the files loaded into the ListView. My intention is to make a little playlist of sorts so I have to modify a couple of ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Saving output of a for-loop to file

I have opened a file with blast results and printed out the hits in fasta format to the screen. The code looks like this: result_handle = open("/Users/jonbra/Desktop/my_blast.xml") from Bio.Blast ...

热门标签