Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用来导入图像的方法要求我使用相对路径,但我要导入的图片位于不同的驱动器上。我不确定是否可以使用相对路径访问该位置。如果不能有人请告诉我另一种方式。
考虑到 Unix 风格的操作系统没有驱动器,我假设您使用的是 Windows。我认为没有“作弊”就无法做到这一点。如果这真的是唯一的方法,我会尝试在原始驱动器文件系统的某个位置创建指向该其他驱动器的符号链接。符号链接在 Windows 上很少见,但可以使用 mklink 命令在 Windows 7、2008 及更高版本上使用 mklink 命令创建。之后,您可以通过同一驱动器内的相对路径访问您的文件。
不确定这是否适合您,但值得一试。