MINOR Using Filesystem::makeFolder() instead of mkdir() in Folder for file operations (from r107275)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112566 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-10-15 03:21:23 +00:00
parent 35b41709c2
commit 07494a5f93

View File

@ -66,7 +66,7 @@ class Folder extends File {
*/
static function findOrMake($folderPath) {
// Create assets directory, if it is missing
if(!file_exists(ASSETS_PATH)) mkdir(ASSETS_PATH,Filesystem::$folder_create_mask);
if(!file_exists(ASSETS_PATH)) Filesystem::makeFolder(ASSETS_PATH);
$folderPath = trim(Director::makeRelative($folderPath));
// replace leading and trailing slashes
@ -87,7 +87,7 @@ class Folder extends File {
$item->write();
}
if(!file_exists($item->getFullPath())) {
mkdir($item->getFullPath(),Filesystem::$folder_create_mask);
Filesystem::makeFolder($item->getFullPath());
}
$parentID = $item->ID;
}