UXP documentation issue

someone help shine some light here. it’s my first time going through uxp and am on the documentation. so am looking at the file system and this page to be specific “https://developer.adobe.com/photoshop/uxp/2022/uxp/reference-js/Modules/uxp/Persistent%20File%20Storage/File/” and am realizing that the "


returns undefined on the console. could I be missing something ?

Also on the following, file system provider is also undefined . “https://developer.adobe.com/photoshop/uxp/2022/uxp/reference-js/Modules/uxp/Persistent%20File%20Storage/FileSystemProvider/
Example simmilar to the above screenshot when fs is replaced with " require(‘uxp’).storage.FileSystemProvider"

when I check properties of


I realize none of the above is in the property tree. could I be misunderstanding something or it’s an issue

File and FileSystemProvider are not directly accessed by you; they use instances already prepared by UXP.

Currently, localFileSystem is defined as the FileSystemProvider. Use it as follows.

const fs = require('uxp').storage.localFileSystem ;
const chosenFile = await fs.getFileForOpening() ;
console.log(chosenFile.isFile) ;

I agree that the documentation is confusing. If the localFileSystem page had such an example, it would be much easier to understand.

1 Like