From 9cbce860a02925bfc6e8e151b5a7c2ce9c63ce09 Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 10 Aug 2017 00:14:28 +0200 Subject: testing server side fs 3 --- test/lang.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/lang.php b/test/lang.php index f41c50955..33fc2e093 100644 --- a/test/lang.php +++ b/test/lang.php @@ -10,14 +10,14 @@ echo "Relocate `community` with `en` as a default: ", relocate($langs, 'communit echo "\nTests:\n"; -$test_dir = '../sv/'; +$test_dir = '../sv/map/index.php'; $lstat = ''; if (file_exists($test_dir)) { echo "The file $test_dir exists\n"; $lstat = lstat($test_dir); // $linkinfo = linkinfo($test_dir); - $readlink = readlink($test_dir . 'map'); +// $readlink = readlink($test_dir); } else { echo "The file $test_dir does not exist\n"; } @@ -28,6 +28,12 @@ if (is_dir($test_dir)) { echo "The $test_dir is not a dir.\n"; } +if (is_file($test_dir)) { + echo "The $test_dir is a file\n"; +} else { + echo "The $test_dir is not a file.\n"; +} + if (is_readable($test_dir)) { echo "The file $test_dir is readable\n"; } else { @@ -35,17 +41,17 @@ if (is_readable($test_dir)) { } var_dump($lstat); -var_dump($readlink); +// var_dump($readlink); -$test_dir = '../sl/'; +$test_dir = '../sl/map/index.php'; $lstat2 = ''; if (file_exists($test_dir)) { echo "The file $test_dir exists\n"; $lstat2 = lstat($test_dir); // $linkinfo = linkinfo($test_dir); - $readlink = readlink($test_dir . 'map'); +// $readlink = readlink($test_dir); } else { echo "The file $test_dir does not exist\n"; } @@ -56,6 +62,12 @@ if (is_dir($test_dir)) { echo "The $test_dir is not a dir.\n"; } +if (is_file($test_dir)) { + echo "The $test_dir is a file\n"; +} else { + echo "The $test_dir is not a file.\n"; +} + if (is_readable($test_dir)) { echo "The file $test_dir is readable\n"; } else { @@ -63,7 +75,7 @@ if (is_readable($test_dir)) { } var_dump($lstat2); -var_dump($readlink); +// var_dump($readlink); $diff = array_diff($lstat, $lstat2); var_dump($diff); -- cgit v1.2.1