function _features_tools_get_unlink_version in Features Tools 6.2
Same name and namespace in other branches
- 6 features_tools.module \_features_tools_get_unlink_version()
Get the next version for the unlink directory.
Parameters
string $destination , the $destination path.:
Return value
array with the directory delta and the new destination.
1 call to _features_tools_get_unlink_version()
File
- ./
features_tools.module, line 272 - features_tools module
Code
function _features_tools_get_unlink_version($destination) {
$destination = substr($destination, 0, strlen($destination) - 1);
$i = 1;
while (file_exists("{$destination}_{$i}")) {
$i++;
}
return array(
'destination' => "{$destination}_{$i}/",
'delta' => $i,
);
}