src/Data/File.php
public static function getSubPath($pFileName, $pDepth = 3)
    {
        if (empty($pFileName)) {
            return DS;
        }

        $levels = array();

        for ($i = 0; $i < $pDepth; $i++) {
            $levels[] = substr($pFileName, $i, 1);
        }

        return implode(DS, $levels) . DS;
    }
public static function getSubPath($pFileName, $pDepth = 3)
    {
        if (empty($pFileName)) {
            return DS;
        }

        $levels = array();

        for ($i = 0; $i < $pDepth; $i++) {
            $levels[] = substr($pFileName, $i, 1);
        }

        return implode(DS, $levels) . DS;
    }
public static function getSubPath ( $ pFileName , $ pDepth = 3 ) { if ( empty ( $ pFileName ) ) { return DS ; } $ levels = array ( ) ; for ( $ i = 0 ; $ i < $ pDepth ; $ i ++ ) { $ levels [ ] = substr ( $ pFileName , $ i , 1 ) ; } return implode ( DS , $ levels ) . DS ; }
Create a path to store files in multiple subdirectories, based on first
letters of filename.

@param string $pFIleName
@param int $pDepth Number of subdirectories
@return string
Create a path to store files in multiple subdirectories based on first letters of filename .