Created file class with File::extension method, added File to aliases under application

This commit is contained in:
Michael Hasselbring
2011-06-16 23:51:28 -05:00
parent 5c275db6f4
commit 4d7794c2ca
2 changed files with 17 additions and 0 deletions

16
system/file.php Normal file
View File

@@ -0,0 +1,16 @@
<?php namespace System;
class File {
/**
* Get a file's extension.
*
* @param string $path
* @return string
*/
public static function extension($path)
{
return pathinfo($path, PATHINFO_EXTENSION);
}
}