Help with pathnamehash

Help with pathnamehash

by Brian Getsinger -
Number of replies: 0

I am writing a plugin external to Moodle that inserts files into directly into the database. I've been successful up to generating the pathnamehash. This is .NET plugin that runs in another application  not affiliated with Moodle.

---------

1. What exactly is the pathnamehash? Is it just a string like the one below?

"/1211/assignmentsubmission_file/submission_files/510//nameofmyfile.txt"

Where

/ContextID/Component/filearea/itemid/filepath/filename

2. If it is a string, what Encoding is it? ASCII, UTF8? .NET forces me to convert the string into Byte Array and then into the Hash.

3. If its not, then can someone explain what I am hashing for this?

I have the file hashed correctly not the pathnamehash. I'm not sure what I am missing...

Any help is appreciated!




Average of ratings: Useful (1)