xref: /MusicFree/src/constants/pathConst.ts (revision cfa0fc0757dad620cd0b0533a949d86b17086d32)
12d0ec5c1S猫头猫import {Platform} from 'react-native';
2*cfa0fc07S猫头猫import RNFS, {CachesDirectoryPath} from 'react-native-fs';
36c6f45bdS猫头猫
42d0ec5c1S猫头猫export const basePath =
52d0ec5c1S猫头猫    Platform.OS === 'android'
66c6f45bdS猫头猫        ? RNFS.ExternalDirectoryPath
72d0ec5c1S猫头猫        : RNFS.DocumentDirectoryPath;
86c6f45bdS猫头猫
96780f402S猫头猫const storagePath = RNFS.ExternalStorageDirectoryPath;
10233cafa6S猫头猫
116c6f45bdS猫头猫export default {
126c6f45bdS猫头猫    pluginPath: `${basePath}/plugins/`,
137f771613S猫头猫    logPath: `${basePath}/log/`,
14233cafa6S猫头猫    dataPath: `${basePath}/data/`,
157f771613S猫头猫    cachePath: `${basePath}/cache/`,
16*cfa0fc07S猫头猫    musicCachePath: CachesDirectoryPath + '/TrackPlayer',
17*cfa0fc07S猫头猫    imageCachePath: CachesDirectoryPath + '/image_manager_disk_cache',
182d0ec5c1S猫头猫    lrcCachePath: `${basePath}/cache/lrc/`,
196780f402S猫头猫    storagePath: `${storagePath}/musicfree/`,
202d0ec5c1S猫头猫    downloadPath: `${storagePath}/musicfree/download/`,
212d0ec5c1S猫头猫};
22