Ok, so this GetDirectUrl method returns you an actual URL of the image. What will be in this URL is defined by a few settings, explained in this documentation article.
For example, if you change in Settings -> Content -> Media URL format from Permanent to Direct file path you'll notice that the same GetDirectUrl method will start returning you a different result. Is this what you are trying to do?
Or do you need to get a file location folder on CMS server so that you can access the file on file system?