xref: /MusicFree/src/constants/pathConst.ts (revision b882a19d884fffa32f7c8cef31652b909dceaa0f)
1import {Platform} from 'react-native';
2import RNFS, {CachesDirectoryPath} from 'react-native-fs';
3
4export const basePath =
5    Platform.OS === 'android'
6        ? RNFS.ExternalDirectoryPath
7        : RNFS.DocumentDirectoryPath;
8
9const storagePath = RNFS.ExternalStorageDirectoryPath;
10
11export default {
12    pluginPath: `${basePath}/plugins/`,
13    logPath: `${basePath}/log/`,
14    dataPath: `${basePath}/data/`,
15    cachePath: `${basePath}/cache/`,
16    musicCachePath: CachesDirectoryPath + '/TrackPlayer',
17    imageCachePath: CachesDirectoryPath + '/image_manager_disk_cache',
18    lrcCachePath: `${basePath}/cache/lrc/`,
19    storagePath: `${storagePath}/musicfree/`,
20    downloadPath: `${storagePath}/musicfree/download/`,
21};
22