Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 使用联机文件目录填充tableview_Swift_Uitableview - Fatal编程技术网

Swift 使用联机文件目录填充tableview

Swift 使用联机文件目录填充tableview,swift,uitableview,Swift,Uitableview,我有以下代码 let webPath = URL(string: "http://peterlinnik.com/Plex%20Music/The%20Beatles%20-%20Discography/Abbey%20Road/") do { // Get the directory contents urls (including subfolders urls) let webFiles = try FileManage

我有以下代码

 let webPath =  URL(string: "http://peterlinnik.com/Plex%20Music/The%20Beatles%20-%20Discography/Abbey%20Road/")

        do {
            // Get the directory contents urls (including subfolders urls)
            let webFiles = try FileManager.default.contentsOfDirectory(at: webPath!, includingPropertiesForKeys: nil, options: [])
            print(webFiles)


        } catch let error as NSError {
            print(error.localizedDescription)
        }
我正试图用这个目录的内容填充一个tableview,目前我只是想让它打印那里的内容,但收到以下错误

“Abbey Road”文件夹不存在

我做错了什么,这能做到吗


web URL不是文件URL

您的URL指向HTML页面-这与文件系统文件夹无关


通过HTML显示的服务器文件夹不会作为实际文件夹直接显示给您。

有没有办法删除这些数据?这似乎是一种非常标准的格式。你有这些音乐文件的权限吗?:/无论如何,是的,这当然是可能的,但这一点也不微不足道。你必须使用一个类库来解析HTML并收集链接。这只是我知道的一个示例目录。。谢谢,我试试看