some_id
some_id

Reputation: 29886

Get the path from NSURL on pasteboard

I can currently get a NSURL from the pasteboard, but it returns the following

file://localhost/Users/Mac/Desktop/SomePath/

How can I get this to return

/Users/Mac/Desktop/SomePath/

Upvotes: 0

Views: 475

Answers (2)

Francis McGrew
Francis McGrew

Reputation: 7272

NSString *path = [someURL path];

Upvotes: 2

guitarflow
guitarflow

Reputation: 2970

 NSString* filePath = [nsUrlObject path];

should do it.

Upvotes: 0

Related Questions