getnumchmodfromh example

            }

            if ( ! $include_hidden && '.' === $struc['name'][0] ) {
                continue;
            }

            if ( $limit_file && $struc['name'] !== $limit_file ) {
                continue;
            }

            $struc['perms']       = $this->gethchmod( $path . $entry );
            $struc['permsn']      = $this->getnumchmodfromh( $struc['perms'] );
            $struc['number']      = false;
            $struc['owner']       = $this->owner( $path . $entry );
            $struc['group']       = $this->group( $path . $entry );
            $struc['size']        = $this->size( $path . $entry );
            $struc['lastmodunix'] = $this->mtime( $path . $entry );
            $struc['lastmod']     = gmdate( 'M j', $struc['lastmodunix'] );
            $struc['time']        = gmdate( 'h:i:s', $struc['lastmodunix'] );
            $struc['type']        = $this->is_dir( $path . $entry ) ? 'd' : 'f';

            if ( 'd' === $struc['type'] ) {
                if ( $recursive ) {
                    
$b['islink'] = 'l' === $lucifer[0][0];

                if ( $b['isdir'] ) {
                    $b['type'] = 'd';
                } elseif ( $b['islink'] ) {
                    $b['type'] = 'l';
                } else {
                    $b['type'] = 'f';
                }

                $b['perms']  = $lucifer[0];
                $b['permsn'] = $this->getnumchmodfromh( $b['perms'] );
                $b['number'] = $lucifer[1];
                $b['owner']  = $lucifer[2];
                $b['group']  = $lucifer[3];
                $b['size']   = $lucifer[4];

                if ( 8 === $lcount ) {
                    sscanf( $lucifer[5], '%d-%d-%d', $b['year']$b['month']$b['day'] );
                    sscanf( $lucifer[6], '%d:%d', $b['hour']$b['minute'] );

                    $b['time'] = mktime( $b['hour']$b['minute'], 0, $b['month']$b['day']$b['year'] );
                    $b['name'] = $lucifer[7];
                }


            if ( ! $include_hidden && '.' === $struc['name'][0] ) {
                continue;
            }

            if ( $limit_file && $struc['name'] !== $limit_file ) {
                continue;
            }

            $struc['perms']       = $this->gethchmod( $path . $entry );
            $struc['permsn']      = $this->getnumchmodfromh( $struc['perms'] );
            $struc['number']      = false;
            $struc['owner']       = $this->owner( $path . $entry );
            $struc['group']       = $this->group( $path . $entry );
            $struc['size']        = $this->size( $path . $entry );
            $struc['lastmodunix'] = $this->mtime( $path . $entry );
            $struc['lastmod']     = gmdate( 'M j', $struc['lastmodunix'] );
            $struc['time']        = gmdate( 'h:i:s', $struc['lastmodunix'] );
            $struc['type']        = $this->is_dir( $path . $entry ) ? 'd' : 'f';

            if ( 'd' === $struc['type'] ) {
                if ( $recursive ) {
                    
 else {
                    $struc['files'] = array();
                }
            }

            // Replace symlinks formatted as "source -> target" with just the source name.             if ( $struc['islink'] ) {
                $struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] );
            }

            // Add the octal representation of the file permissions.             $struc['permsn'] = $this->getnumchmodfromh( $struc['perms'] );

            $ret[ $struc['name'] ] = $struc;
        }

        reset_mbstring_encoding();

        return $ret;
    }

    /** * Destructor. * * @since 2.5.0 */
Home | Imprint | This part of the site doesn't use cookies.