fix
This commit is contained in:
parent
e7f6ea07ad
commit
4d590e7e97
27
src/App.tsx
27
src/App.tsx
|
|
@ -20,29 +20,10 @@ import PythonEnvManagerPage from './pages/PythonEnvManagerPage'
|
||||||
import * as path from '@tauri-apps/api/path';
|
import * as path from '@tauri-apps/api/path';
|
||||||
import { convertFileSrc } from '@tauri-apps/api/core'
|
import { convertFileSrc } from '@tauri-apps/api/core'
|
||||||
async function testPath() {
|
async function testPath() {
|
||||||
console.log({
|
const appDataDirPath = await path.appDataDir();
|
||||||
appCacheDir: await path.appCacheDir(),
|
const filePath = await path.join(appDataDirPath, 'assets/video.mp4');
|
||||||
appConfigDir: await path.appConfigDir(),
|
const assetUrl = convertFileSrc(filePath);
|
||||||
appDataDir: await path.appDataDir(),
|
console.log({ filePath, assetUrl })
|
||||||
appLocalDataDir: await path.appLocalDataDir(),
|
|
||||||
audioDir: await path.audioDir(),
|
|
||||||
cacheDir: await path.cacheDir(),
|
|
||||||
configDir: await path.configDir(),
|
|
||||||
dataDir: await path.dataDir(),
|
|
||||||
desktopDir: await path.desktopDir(),
|
|
||||||
documentDir: await path.documentDir(),
|
|
||||||
downloadDir: await path.downloadDir(),
|
|
||||||
executableDir: await path.executableDir(),
|
|
||||||
fontDir: await path.fontDir(),
|
|
||||||
homeDir: await path.homeDir(),
|
|
||||||
localDataDir: await path.localDataDir(),
|
|
||||||
pictureDir: await path.pictureDir(),
|
|
||||||
publicDir: await path.publicDir(),
|
|
||||||
})
|
|
||||||
|
|
||||||
const mp4 = await path.join(await path.publicDir(), '1.mp4')
|
|
||||||
const url = convertFileSrc(mp4)
|
|
||||||
console.log({ mp4, url })
|
|
||||||
}
|
}
|
||||||
function App() {
|
function App() {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue