如果我在本地计算机上的任何地方放置一个adobe文档。
示例:C:\doc\adobe-xd\brand\brand.xd
打开它,运行一个插件。
是否可以检索adobe文档位置。
我在获取插件或插件设置位置时没有遇到任何问题
编辑
在adobexdplatform上找到答案
// These require no user interaction:
const tempFolder = await fs.getTemporaryFolder();
const pluginFolder = await fs.getPluginFolder(); // read-only access to the plugin's install folder
const pluginDataFolder = await fs.getDataFolder(); // folder to store settings
// Display file/folder picker UI to access user files:
const userFolder = await fs.getFolder(); // folder picker
const aFile = await fs.getFileForOpening(); // "Open" file picker, suitable for reading contents
const anotherFile = await fs.getFileForSaving("hello.txt"); // "Save" file picker, suitable for writing contents发布于 2019-01-30 09:07:05
目前还没有API来告诉您当前XD文档在磁盘上的名称或位置,但请记住,无论怎样,都可能存在名称/位置不可用的无标题文档。
如果您只是好奇插件通常如何访问磁盘上的任意位置(不一定是.xd文档文件),那么您找到的API文档是正确的:您可以启动一个文件打开/保存对话框来从用户那里访问其他文件。这类似于Mac和Windows应用程序中的权限模型。
https://stackoverflow.com/questions/54343808
复制相似问题