Lines Matching refs:file

13 @unlink('test.file');
15 if (file_exists('test.file')) {
16 echo "test.file exists\n";
18 echo "test.file does not exist\n";
20 fclose (fopen('test.file', 'w'));
21 chmod ('test.file', 0744);
22 if (file_exists('test.file')) {
23 echo "test.file exists\n";
25 echo "test.file does not exist\n";
28 symlink('test.file','test.link');
34 if (is_link('test.file')) {
35 echo "test.file is a symlink\n";
37 echo "test.file is not a symlink\n";
44 if (file_exists('test.file')) {
45 echo "test.file exists\n";
47 echo "test.file does not exist\n";
49 $s = stat ('test.file');
50 $ls = lstat ('test.file');
53 echo "test.file lstat and stat differ at element $i\n";
63 echo "test.file is " . filetype('test.file') . "\n";
65 printf ("test.file permissions are 0%o\n", 0777 & fileperms('test.file'));
66 echo "test.file size is " . filesize('test.file') . "\n";
67 if (is_writeable('test.file')) {
68 echo "test.file is writeable\n";
70 echo "test.file is not writeable\n";
72 if (is_readable('test.file')) {
73 echo "test.file is readable\n";
75 echo "test.file is not readable\n";
77 if (is_executable('test.file')) {
78 echo "test.file is executable\n";
80 echo "test.file is not executable\n";
82 if (is_file('test.file')) {
83 echo "test.file is a regular file\n";
85 echo "test.file is not a regular file\n";
88 echo "test.link is a regular file\n";
90 echo "test.link is not a regular file\n";
97 if (is_dir('../file')) {
98 echo "../file is a directory\n";
100 echo "../file is not a directory\n";
102 if (is_dir('test.file')) {
103 echo "test.file is a directory\n";
105 echo "test.file is not a directory\n";
107 unlink('test.file');
109 if (file_exists('test.file')) {
110 echo "test.file exists (cached)\n";
112 echo "test.file does not exist\n";
115 if (file_exists('test.file')) {
116 echo "test.file exists\n";
118 echo "test.file does not exist\n";
122 test.file does not exist
123 test.file exists
125 test.file is not a symlink
127 test.file exists
133 test.file is file
135 test.file permissions are 0744
136 test.file size is 0
137 test.file is writeable
138 test.file is readable
139 test.file is executable
140 test.file is a regular file
141 test.link is a regular file
143 ../file is a directory
144 test.file is not a directory
145 test.file does not exist
146 test.file does not exist