Пример #1
0
print_r($myList);
echo '<br />';
$myList = $dirobj->get_human_readable_filesize($pathtodir . 'Malta 1266.jpg');
print_r($myList);
echo '<br />';
$zmieniony = $dirobj->get_human_readable_lastmod($pathtodir . 'Malta 1266.jpg');
echo "zmieniony {$zmieniony}";
echo '<br />';
$ext_check = $dirobj->check_file_extension($pathtodir . 'Malta 1266.jpg', 'jpg');
echo "czy rozszerzenie jpg : {$ext_check}";
echo '<br />';
$typ_mime = $dirobj->get_mime_content_type($pathtodir . 'class_dirtool-2005-12-29.zip');
//$typ_mime = mime_content_type($pathtodir . 'class_dirtool-2005-12-29.zip');
echo '<br />';
echo 'get_most_recent_file<br /> ';
$myList = $dirobj->get_most_recent_file(null, $pathtodir, true);
print_r($myList);
echo '<br />';
echo date($dirobj->datetime_format, $myList['last_modified']);
echo '<br />';
echo '<br />';
echo '<br />';
echo '<br />';
$myList = $dirobj->get_sorted_dirlist(null, $pathtodir, true);
echo 'lista folderow sort : ';
print_r($myList);
echo '<br />';
$myList = $dirobj->get_sorted_filelist(null, null, $pathtodir, true);
echo 'lista plików sort : ';
print_r($myList);
echo '<br />';
Пример #2
0
<?php 
$comparets = time() - 4 * 7 * 24 * 60 * 60;
$myList = $dirobj->get_files_modified_since($comparets, true, $pathtodir, true);
print '<pre>filecount is : ' . $dirobj->fileselection_count . '<br /><br />';
print_r($myList);
print '</pre>';
?>

	<h2>Example 3</h2>
	<p>Let's use the original list to select the most recent file.</p>
	<code>$myfile = $dirobj->get_most_recent_file( false );</code>
	<h4>Results in:</h4>

<?php 
$myfile = $dirobj->get_most_recent_file(false);
print '<pre>';
print_r($myfile);
print '</pre>';
?>

	<p>Hmm... that date doesn't look very good, let's make it a bit more readable using the class default datetimeformat:</p>
	<code>date( $dirobj->datetime_format, $myfile['last_modified'])</code>
	<p>which gives us:</p>

<?php 
print '<pre>' . date($dirobj->datetime_format, $myfile['last_modified']) . '</pre>';
?>

	<h2>Example 4</h2>
	<p>Let's get some more information on the first 2 files (if we have 2) within the selection</p>