Documentation
getPath
usage
string path = file->getPath()
retourne
the path of the file, but inside the Officity Files directory, as it's saved in the database (allowing easier server change or hard disk reorganisation).
exemples
include('../Kernel/common/file.class.php');
$file = new File('/media/picture1.jpg');
echo $file->getName(); // picture1.jpg
echo $file->getShortName(); // picture1
echo $file->getExtension(); // jpg
echo $file->getPath(); // /media/picture1.jpg
echo $file->getCompletePath(); // /var/www/Files/media/picture1.jpg
$file = new File('/media/mysound.mp3');
echo $file->getName(); // mysound.mp3
echo $file->getShortName(); // mysound
echo $file->getExtension(); // mp3
echo $file->getPath(); // /media/mysound.mp3
echo $file->getCompletePath(); // /var/www/Files/media/mysound.mp3