echo '<br />'; $myList = $dirobj->get_sorted_filelist(null, null, $pathtodir, true); echo 'lista plików sort : '; print_r($myList); echo '<br />'; $myList = array_merge($dirobj->get_sorted_dirlist(null, $pathtodir, true), $dirobj->get_sorted_filelist(null, null, $pathtodir, true)); echo 'razem sort : '; print_r($myList); echo '<br />'; echo '<br />'; echo '<br />'; echo '<br />'; echo 'szczegoly na temat pliku<br />'; $myList = $dirobj->get_filelist(null, $pathtodir, false); print_r($myList); echo '<br />'; $max = $dirobj->filecount; echo "liczba plików: {$max}"; for ($i = 0; $i < $max; $i++) { $file = $myList[$i]; print '<pre>filename is : ' . $file . "\n"; print 'file size is : ' . $dirobj->get_human_readable_filesize($pathtodir . $file) . "\n"; print 'file was last modified on : ' . $dirobj->get_human_readable_lastmod($dirobj->last_path . $file) . "\n"; print 'file was last accessed on : ' . $dirobj->get_human_readable_lastacc($pathtodir . $file, 'l j F Y \\a\\t g:i a') . "\n"; print 'file permissions are : ' . $dirobj->get_human_readable_file_permissions($pathtodir . $file) . "\n"; print 'file owner is : ' . $dirobj->get_file_owner($pathtodir . $file) . '</pre>'; } echo '<br />'; ?>
print 'last modified date is ' . $dirobj->get_human_readable_lastmod( $dirobj->last_path . $file ) . '<br>'; print 'last access date is ' . $dirobj->get_human_readable_lastacc( $pathtodir . $file, 'l j F Y \a\t g:i a' ) . '<br>'; print 'file permissions are ' . $dirobj->get_human_readable_file_permissions( $pathtodir . $file ) . '<br>'; print 'file owner is ' . $dirobj->get_file_owner( $pathtodir . $file ) . '</p>'; }</pre> <h4>Results in:</h4> <?php $max = $dirobj->fileselection_count > 2 ? 2 : $dirobj->fileselection_count; for ($i = 0; $i < $max; $i++) { $file = $dirobj->filelist_selection[$i]; print '<pre>filename is : ' . $file . "\n"; print 'file size is : ' . $dirobj->get_human_readable_filesize($pathtodir . $file) . "\n"; print 'file was last modified on : ' . $dirobj->get_human_readable_lastmod($dirobj->last_path . $file) . "\n"; print 'file was last accessed on : ' . $dirobj->get_human_readable_lastacc($pathtodir . $file, 'l j F Y \\a\\t g:i a') . "\n"; print 'file permissions are : ' . $dirobj->get_human_readable_file_permissions($pathtodir . $file) . "\n"; print 'file owner is : ' . $dirobj->get_file_owner($pathtodir . $file) . '</pre>'; } ?> <h2>Example 5</h2> <p>Ok, so maybe I want to know the total filesize of these files (based on the selection)</p> <code>$dirsize = $dirobj->get_dirsize( true );</code> <h4>Results in:</h4> <?php $dirsize = $dirobj->get_dirsize(true); print '<pre>' . $dirsize . '</pre>'; ?>