Copy link to clipboard
Copied
I am using ExtendScript as part of a cross-platform application such as Tauri or Electron. It is necessary to generate a POSIX path string from the File object so that it can be handled by that process.
ExtendScript's File.fullName can be handled normally on the local disk. However, on an external disk, it is different from the format required by the cross-platform application.
|
Expected Value |
Actual Value |
macOS |
/Volumes/volume_name/path/to/file.ext |
/volume_name/path/to/file.ext |
Windows |
D:/path/to/file.ext |
/d/path/to/file.ext |
Is there any way to get the path string indicated by Expected Value other than doing text replacement on my own?
`File.fsName` works for me on a Mac.
absoluteURI: /G-DRIVE/test/asu.jpg
fsName: /Volumes/G-DRIVE/test/asu.jpg
fullName: /G-DRIVE/test/asu.jpg
Copy link to clipboard
Copied
`File.fsName` works for me on a Mac.
absoluteURI: /G-DRIVE/test/asu.jpg
fsName: /Volumes/G-DRIVE/test/asu.jpg
fullName: /G-DRIVE/test/asu.jpg
Copy link to clipboard
Copied
Thank you, File.fsName worked for both macOS and Windows.
The format would be something like D:\path\to\file.ext on Windows, but the cross-platform application accepted that format when I tried it.