public static function install_mock_files()
    {
        $sample_path = Director::baseFolder().'/'.MOCK_DATAOBJECTS_DIR.'/lib';
        $sample_files = glob($sample_path.'/*.jpeg');
        $folder = self::get_mock_folder();
        $installed_sample_files = self::get_mock_files();
        if (sizeof($sample_files) <= $installed_sample_files->count()) {
            return;
        }

        foreach ($sample_files as $file) {
            copy($file, $folder->getFullPath().basename($file));
        }
        $folder->syncChildren();
    }
public static function install_mock_files()
    {
        $sample_path = Director::baseFolder().'/'.MOCK_DATAOBJECTS_DIR.'/lib';
        $sample_files = glob($sample_path.'/*.jpeg');
        $folder = self::get_mock_folder();
        $installed_sample_files = self::get_mock_files();
        if (sizeof($sample_files) <= $installed_sample_files->count()) {
            return;
        }

        foreach ($sample_files as $file) {
            copy($file, $folder->getFullPath().basename($file));
        }
        $folder->syncChildren();
    }
public static function install_mock_files ( ) { $ sample_path = Director :: baseFolder ( ) . '/' . MOCK_DATAOBJECTS_DIR . '/lib' ; $ sample_files = glob ( $ sample_path . '/*.jpeg' ) ; $ folder = self :: get_mock_folder ( ) ; $ installed_sample_files = self :: get_mock_files ( ) ; if ( sizeof ( $ sample_files ) <= $ installed_sample_files -> count ( ) ) { return ; } foreach ( $ sample_files as $ file ) { copy ( $ file , $ folder -> getFullPath ( ) . basename ( $ file ) ) ; } $ folder -> syncChildren ( ) ; }
Copies stock files from the module directory to the filesytem and updates the database.
Copies stock files from the module directory to the filesytem and updates the database .