1.0.2 • Published 2 years ago
expo_file_name v1.0.2
HOW TO GET THE FILE NAME
import {getFileName} from 'expo_file_name';
//it needs one parameter ( uri )
const fileName = getFileName(uri)
//the file's name is stored in the fileName variable
console.log(fileName);
EXAMPLE
import {getFileName} from 'expo_file_name';
const uri = "file://the/dirextory/of/the/file/in/expo/thefile.jpeg";
const fileName = getFileName(uri)
console.log(fileName);
//result
thefile.jpeg