Created file class with File::extension method, added File to aliases under application
This commit is contained in:
16
system/file.php
Normal file
16
system/file.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user