Guide on Moodle File Directory?

Re: Guide on Moodle File Directory?

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

Is this a developer question?  or just a general kinda thing?   Are you a developer?

If you mean files uploaded to moodle as part of a course ..

look in moodledata/ and read and heed the readme.txt file.

Official stuff:

https://docs.moodle.org/311/en/Working_with_files
https://docs.moodle.org/dev/File_API_internals
File storage on disk
"Suppose a file has SHA1 hash 081371cb102fa559e81993fddc230c79205232ce in the files table contenthash field. Then it will be stored in on disc as moodledata/filedir/08/13/081371cb102fa559e81993fddc230c79205232ce. "

For your specific 'like' ...

From mysql client using the DB for Moodle, this query:
select * from `mdl_files` where `component` like "%h5p%"
you'll see component core_h5p and filearea libraries all part of h5p core.
contenthash is actual location and filename in moodledata/filedir/ as per file storage on disk above.

If you are asking about moodle code ... files in your 'moodle' diretory, those are mostly php scripts but you will find .js, .json, etc's files.  

A linux find ./ -name \*.js |wc -l in code directory will find 3652 .js files.

All folders and files in moodle/blocks/ pertain to Moodle blocks

https://docs.moodle.org/311/en/Blocks

All folders/files in moodle/theme/ pertain to the themes installed in your Moodle.

https://moodle.org/plugins/browse.php?list=category&id=3

A theme can be an addon.

That help?   Confused yet? smile

'SoS', Ken