PathUtils
This API provides some convenient methods to better handle icloud related paths
Import
import { PathUtils } from 'react-native-cloud-store'
API
subPath
function subPath(
from: string,
to: string
): string
subPath('a', 'a/b') // return '/b'
join
function join(
...segments: string[]
): string
join('a', 'b/c', '/d/e') // return '/a/b/c/d/e'
iCloudRemoveDotExt
function iCloudRemoveDotExt(
path: string
): string
iCloudRemoveDotExt('/a/.sth.icloud') // return '/a/sth'
ext
function ext(
path: string
): string
ext('/a/sth.txt') // return 'txt'