ios - Swift How do I convert document file URLs to strings so I can display the file names in tableview -


currently have files in array urls:

var caffilesarray: [nsurl] {     return (nsfilemanager.defaultmanager().contentsofdirectoryaturl(documentsdirectoryurl, includingpropertiesforkeys: nil, options: .skipshiddenfiles | .skipssubdirectorydescendants | .skipspackagedescendants, error: nil) as! [nsurl]).sorted{$0.lastpathcomponent<$1.lastpathcomponent}.filter{$0.pathextension!.lowercasestring == "caf"} 

how convert array of urls strings can display them in tableview.

thanks.

loop through nsurl array , myurl.absolutestring convert each element string , append array.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -