How to fetch full path of file which is stored in moodledata?

Re: How to fetch full path of file which is stored in moodledata?

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There is intentionally not API to get the path of the file, becuase it would be a disaster if the content of the file was changed.

That is why there are only APIs to get the file contents, or a read-only file handle.

If you really need a file path, you must call the API that copies the file to a temp directory, and returns you the path to the copy.

Average of ratings: Useful (3)