I am updating a custom plugin that utilizes the Knowledge Document Type and uses the getInternalFilename() to get the absolute path of the document. That function has been deprecated, what is the preferred replacement, as I still need the absolute path of the document. Would getExternalFilename() return a similar value.
Discussion posts and replies are publicly visible
Preferred way is to use the file stream APIs instead of the deprecated ones. Have listed a few use cases for working with documents.
For reading, use getInputStream of Document object returned by ContentService.download() api by passing the document id.
For updating an existing document, similarly use getOutputStream and write to the DocumentOutputStream returned.
For creating a new document, create a new Document object, call contentService.uploadDocument which returns a ContentUploadOutputStream. Then write data to this output stream. Note that the getContentId method returns the newly created document id.