function actionDefault() { YDDebugUtil::dump(YDPath::getDirectorySeparator(), 'getDirectorySeparator()'); YDDebugUtil::dump(YDPath::getPathSeparator(), 'getPathSeparator()'); YDDebugUtil::dump(YDPath::getVolumeSeparator(), 'getVolumeSeparator()'); YDDebugUtil::dump(YDPath::changeExtension(__FILE__, '.tpl'), 'changeExtension( __FILE__, ".tpl" )'); YDDebugUtil::dump(YDPath::getDirectoryName(__FILE__), 'getDirectoryName( __FILE__ )'); YDDebugUtil::dump(YDPath::getExtension(__FILE__), 'getExtension( __FILE__ )'); YDDebugUtil::dump(YDPath::getFileName(__FILE__), 'getFileName( __FILE__ )'); YDDebugUtil::dump(YDPath::getFileNameWithoutExtension(__FILE__), 'getFileNameWithoutExtension( __FILE__ )'); YDDebugUtil::dump(YDPath::getFilePath(__FILE__), 'getFilePath( __FILE__ )'); YDDebugUtil::dump(YDPath::getFilePathWithoutExtension(__FILE__), 'getFilePathWithoutExtension( __FILE__ )'); YDDebugUtil::dump(YDPath::getFullPath(__FILE__), 'getFullPath( __FILE__ )'); YDDebugUtil::dump(YDPath::getTempFileName(), 'getTempFileName()'); YDDebugUtil::dump(YDPath::getTempPath(), 'getTempPath()'); YDDebugUtil::dump(YDPath::hasExtension(__FILE__), 'hasExtension( __FILE__ )'); YDDebugUtil::dump(YDPath::hasExtension(YDPath::getFileNameWithoutExtension(__FILE__)), 'hasExtension( YDPath::getFileNameWithoutExtension( __FILE__ ) )'); YDDebugUtil::dump(YDPath::isAbsolute(__FILE__), 'isAbsolute( __FILE__ )'); YDDebugUtil::dump(YDPath::isAbsolute(YDPath::getFileName(__FILE__)), 'isAbsolute( getFileName( __FILE__ ) )'); YDDebugUtil::dump(YDPath::join(__FILE__), 'join( __FILE__ )'); YDDebugUtil::dump(YDPath::join(YDPath::getTempPath(), YDPath::getFileName(__FILE__)), 'join( getTempPath(), getFileName( __FILE__ ) )'); YDDebugUtil::dump(YDPath::join(YDPath::getTempPath(), __FILE__), 'join( getTempPath(), __FILE__ )'); }
/** * This function will save the XML data to the specified file. * * @remark * The default format is "RSS2.0". If you specify no argument indicating the requested format, the "RSS2.0" * format will be used. * * @param $path The path to save the XML data to. * @param $format (optional) The format in which the items should be converted. */ function saveXml($path, $format = 'RSS2.0') { // Get the XML data $xml = $this->toXml($format); // Get the directory information $dir = new YDFSDirectory(YDPath::getDirectoryName($path)); // Create the file $dir->createFile(YDPath::getFileName($path), $xml); }
/** * Function to get the basename of the directory. This does not include the path information. * * @returns String containing the name of the object. */ function getBasename() { return YDPath::getFileName($this->getAbsolutePath()); }