Looping through a directory on the web and displaying its contents (files and other directories) via Python

前端 未结 2 833
滥情空心
滥情空心 2021-01-27 10:28

In the same vein as Process a set of files from a source directory to a destination directory in Python I\'m wondering if it is possible to create a function that when given a w

2条回答
  •  天命终不由人
    2021-01-27 10:45

    You may got the concept confused. Directory is file system concept. URL do not have a concept of directory. It looks similar to the path name of a file system and often maps to a directory. But there is no requirement for it to be backed by a file system.

    For example, Process a set of files from a source directory to a destination directory in Python may map to a directory

    /htdocs/questions/2593399/

    But more likely it is generated from a database query and does not map to anything in the file system.

提交回复
热议问题