xref: /MusicFree/src/constants/pathConst.ts (revision 8c94d91f427a9d201647bda098f5b3187d552591)
12d0ec5c1S猫头猫import {Platform} from 'react-native';
2cfa0fc07S猫头猫import RNFS, {CachesDirectoryPath} from 'react-native-fs';
36c6f45bdS猫头猫
42d0ec5c1S猫头猫export const basePath =
52d0ec5c1S猫头猫    Platform.OS === 'android'
66c6f45bdS猫头猫        ? RNFS.ExternalDirectoryPath
72d0ec5c1S猫头猫        : RNFS.DocumentDirectoryPath;
86c6f45bdS猫头猫
96c6f45bdS猫头猫export default {
106c6f45bdS猫头猫    pluginPath: `${basePath}/plugins/`,
117f771613S猫头猫    logPath: `${basePath}/log/`,
12233cafa6S猫头猫    dataPath: `${basePath}/data/`,
137f771613S猫头猫    cachePath: `${basePath}/cache/`,
14cfa0fc07S猫头猫    musicCachePath: CachesDirectoryPath + '/TrackPlayer',
15cfa0fc07S猫头猫    imageCachePath: CachesDirectoryPath + '/image_manager_disk_cache',
162d0ec5c1S猫头猫    lrcCachePath: `${basePath}/cache/lrc/`,
17*8c94d91fS猫头猫    downloadPath: `${basePath}/download/`,
18*8c94d91fS猫头猫    downloadMusicPath: `${basePath}/download/music/`,
192d0ec5c1S猫头猫};
20