#Query folders in directory

10 messages · Page 1 of 1 (latest)

final flame
#

Is it possible to query the folder names in a specified directory (not on the disk, obviously)? I've seen it's possible in Node, but is it possible without that?

mystic jolt
#

"without that" so in the browser? No

noble heath
#

what exactly is a directory that's not on the disk?

final flame
# noble heath what exactly is a directory that's not on the disk?

hm, maybe that was worded wrong (still don't know much web dev). the folders i want to query contain asset files. of course, those files have to be hosted somewhere, be that my machine or some other host, which will still be some form of disk. what i meant was basically; they're directories the browser should technically already know about.

mystic jolt
#

The browser knows nothing

#

It makes HTTP requests to a server, the server responds

#

it doesn't even have to respond with a file on disk (if it does, those are typically called static assets, correct)

#

The browser (pedantically HTTP) doesn't have a concept of files and folders. You query a path /assets/script.js, the server responds with whatever it wants

#

The browser doesn't know that /assets is a folder on your server