[feat] `path.relative` API method
Describe the problem
I'm working with a couple projects where using the Tauri API to get the relative path between two files would be useful.
Describe the solution you'd like
I would like to update the Tauri commands and JS APIs to export a relative method/function similar to the one provided by the Node.js path module:
import { relative } from '@tauri/api/path';
// POSIX
relative('/data/orandea/test/aaa', '/data/orandea/impl/bbb') == '../../impl/bbb';
// Windows
relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb') == '..\\..\\impl\\bbb';
Alternatives considered
Create a custom Tauri command in each project.
Additional context
Originally discussed in https://github.com/tauri-apps/tauri/discussions/8270, posted by Natejoestev back on November 20, 2023
I'm willing to create a PR for this work, but wanted to submit an issue first per the Pull Request Guidelines in the Tauri Contribution Guide
apologies for the late reply @frankolson, feel free to open a PR, thanks