summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/copy_variation4.phpt
blob: 3c10edb2141e87d829bdeef88a506af26194386f (plain)
ofshex dumpascii
0000 2d 2d 54 45 53 54 2d 2d 0a 54 65 73 74 20 63 6f 70 79 28 29 20 66 75 6e 63 74 69 6f 6e 3a 20 75 --TEST--.Test.copy().function:.u
0020 73 61 67 65 20 76 61 72 69 61 74 69 6f 6e 73 20 2d 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 sage.variations.-.destination.fi
0040 6c 65 20 6e 61 6d 65 73 28 65 6d 70 74 79 20 73 74 72 69 6e 67 2c 20 6e 75 6c 6c 73 20 26 20 62 le.names(empty.string,.nulls.&.b
0060 6f 6f 6c 73 29 0a 2d 2d 53 4b 49 50 49 46 2d 2d 0a 3c 3f 70 68 70 0a 69 66 28 73 75 62 73 74 72 ools).--SKIPIF--.<?php.if(substr
0080 28 50 48 50 5f 4f 53 2c 20 30 2c 20 33 29 20 3d 3d 20 22 57 49 4e 22 29 0a 20 20 64 69 65 28 22 (PHP_OS,.0,.3).==."WIN")...die("
00a0 73 6b 69 70 20 44 6f 20 6e 6f 74 20 72 75 6e 20 6f 6e 20 57 69 6e 64 6f 77 73 22 29 3b 0a 0a 69 skip.Do.not.run.on.Windows");..i
00c0 66 28 73 75 62 73 74 72 28 50 48 50 5f 4f 53 2c 20 30 2c 20 33 29 20 3d 3d 20 22 41 49 58 22 29 f(substr(PHP_OS,.0,.3).==."AIX")
00e0 0a 20 20 64 69 65 28 22 73 6b 69 70 20 44 6f 20 6e 6f 74 20 72 75 6e 20 6f 6e 20 41 49 58 22 29 ...die("skip.Do.not.run.on.AIX")
0100 3b 0a 3f 3e 0a 2d 2d 46 49 4c 45 2d 2d 0a 3c 3f 70 68 70 0a 2f 2a 20 50 72 6f 74 6f 74 79 70 65 ;.?>.--FILE--.<?php./*.Prototype
0120 3a 20 62 6f 6f 6c 20 63 6f 70 79 20 28 20 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 2c 20 73 74 :.bool.copy.(.string.$source,.st
0140 72 69 6e 67 20 24 64 65 73 74 20 29 3b 0a 20 20 20 44 65 73 63 72 69 70 74 69 6f 6e 3a 20 4d 61 ring.$dest.);....Description:.Ma
0160 6b 65 73 20 61 20 63 6f 70 79 20 6f 66 20 74 68 65 20 66 69 6c 65 20 73 6f 75 72 63 65 20 74 6f kes.a.copy.of.the.file.source.to
0180 20 64 65 73 74 2e 0a 20 20 20 20 20 52 65 74 75 72 6e 73 20 54 52 55 45 20 6f 6e 20 73 75 63 63 .dest.......Returns.TRUE.on.succ
01a0 65 73 73 20 6f 72 20 46 41 4c 53 45 20 6f 6e 20 66 61 69 6c 75 72 65 2e 0a 2a 2f 0a 0a 2f 2a 20 ess.or.FALSE.on.failure..*/../*.
01c0 54 65 73 74 20 63 6f 70 79 28 29 20 66 75 6e 63 74 69 6f 6e 3a 20 49 6e 20 63 72 65 61 74 69 6f Test.copy().function:.In.creatio
01e0 6e 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d 65 73 20 77 69 74 68 n.of.destination.file.names.with
0200 20 65 6d 70 74 79 20 73 74 72 69 6e 67 2c 20 6e 75 6c 6c 73 20 26 20 62 6f 6f 6c 73 0a 20 20 20 .empty.string,.nulls.&.bools....
0220 20 20 61 6e 64 20 63 68 65 63 6b 69 6e 67 20 74 68 65 20 65 78 69 73 74 65 6e 63 65 20 61 6e 64 ..and.checking.the.existence.and
0240 20 73 69 7a 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 73 0a 2a 2f 0a 0a 65 .size.of.destination.files.*/..e
0260 63 68 6f 20 22 2a 2a 2a 20 54 65 73 74 20 63 6f 70 79 28 29 20 66 75 6e 63 74 69 6f 6e 3a 20 64 cho."***.Test.copy().function:.d
0280 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d 65 73 20 77 69 74 68 20 65 6d 70 74 79 estination.file.names.with.empty
02a0 20 73 74 72 69 6e 67 2c 20 6e 75 6c 6c 73 20 26 20 62 6f 6f 6c 73 20 2a 2a 2a 5c 6e 22 3b 0a 24 .string,.nulls.&.bools.***\n";.$
02c0 66 69 6c 65 5f 70 61 74 68 20 3d 20 64 69 72 6e 61 6d 65 28 5f 5f 46 49 4c 45 5f 5f 29 3b 0a 24 file_path.=.dirname(__FILE__);.$
02e0 73 72 63 5f 66 69 6c 65 5f 6e 61 6d 65 20 3d 20 24 66 69 6c 65 5f 70 61 74 68 2e 22 2f 63 6f 70 src_file_name.=.$file_path."/cop
0300 79 5f 76 61 72 69 61 74 69 6f 6e 34 2e 74 6d 70 22 3b 0a 24 66 69 6c 65 5f 68 61 6e 64 6c 65 20 y_variation4.tmp";.$file_handle.
0320 3d 20 66 6f 70 65 6e 28 24 73 72 63 5f 66 69 6c 65 5f 6e 61 6d 65 2c 20 22 77 22 29 3b 0a 66 77 =.fopen($src_file_name,."w");.fw
0340 72 69 74 65 28 20 24 66 69 6c 65 5f 68 61 6e 64 6c 65 2c 20 73 74 72 5f 72 65 70 65 61 74 28 62 rite(.$file_handle,.str_repeat(b
0360 22 48 65 6c 6c 6f 32 57 6f 72 6c 64 2e 2e 2e 5c 6e 22 2c 20 31 30 30 29 20 29 3b 0a 66 63 6c 6f "Hello2World...\n",.100).);.fclo
0380 73 65 28 24 66 69 6c 65 5f 68 61 6e 64 6c 65 29 3b 0a 0a 2f 2a 20 61 72 72 61 79 20 6f 66 20 64 se($file_handle);../*.array.of.d
03a0 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d 65 73 20 2a 2f 0a 24 64 65 73 74 5f 66 estination.file.names.*/.$dest_f
03c0 69 6c 65 73 20 3d 20 61 72 72 61 79 28 0a 0a 20 20 2f 2a 20 46 69 6c 65 20 6e 61 6d 65 73 20 63 iles.=.array(..../*.File.names.c
03e0 6f 6e 74 61 69 6e 69 6e 67 28 6f 72 20 77 69 74 68 29 20 6e 75 6c 6c 73 20 2a 2f 0a 20 20 22 22 ontaining(or.with).nulls.*/...""
0400 2c 0a 20 20 4e 55 4c 4c 2c 0a 20 20 22 5c 30 22 2c 0a 20 20 46 41 4c 53 45 2c 0a 20 20 66 61 6c ,...NULL,..."\0",...FALSE,...fal
0420 73 65 2c 0a 20 20 54 52 55 45 2c 0a 20 20 74 72 75 65 0a 29 3b 0a 0a 65 63 68 6f 20 22 53 69 7a se,...TRUE,...true.);..echo."Siz
0440 65 20 6f 66 20 74 68 65 20 73 6f 75 72 63 65 20 66 69 6c 65 20 62 65 66 6f 72 65 20 63 6f 70 79 e.of.the.source.file.before.copy
0460 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 22 3b 0a 76 61 72 5f 64 75 6d 70 28 20 66 69 6c 65 73 .operation.=>.";.var_dump(.files
0480 69 7a 65 28 24 73 72 63 5f 66 69 6c 65 5f 6e 61 6d 65 29 20 29 3b 0a 63 6c 65 61 72 73 74 61 74 ize($src_file_name).);.clearstat
04a0 63 61 63 68 65 28 29 3b 0a 0a 65 63 68 6f 20 22 5c 6e 2d 2d 20 4e 6f 77 20 61 70 70 6c 79 69 6e cache();..echo."\n--.Now.applyin
04c0 67 20 63 6f 70 79 28 29 20 6f 6e 20 73 6f 75 72 63 65 20 66 69 6c 65 20 74 6f 20 63 72 65 61 74 g.copy().on.source.file.to.creat
04e0 65 20 63 6f 70 69 65 73 20 2d 2d 22 3b 0a 24 63 6f 75 6e 74 20 3d 20 31 3b 0a 66 6f 72 65 61 63 e.copies.--";.$count.=.1;.foreac
0500 68 28 24 64 65 73 74 5f 66 69 6c 65 73 20 61 73 20 24 64 65 73 74 5f 66 69 6c 65 29 20 7b 0a 20 h($dest_files.as.$dest_file).{..
0520 20 65 63 68 6f 20 22 5c 6e 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 24 63 6f 75 6e 74 20 2d 2d 5c .echo."\n--.Iteration.$count.--\
0540 6e 22 3b 0a 20 20 24 64 65 73 74 5f 66 69 6c 65 5f 6e 61 6d 65 20 3d 20 24 66 69 6c 65 5f 70 61 n";...$dest_file_name.=.$file_pa
0560 74 68 2e 22 2f 24 64 65 73 74 5f 66 69 6c 65 22 3b 0a 0a 20 20 65 63 68 6f 20 22 45 78 69 73 74 th."/$dest_file";....echo."Exist
0580 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 ence.of.destination.file.before.
05a0 63 6f 70 79 20 3d 3e 20 22 3b 0a 20 20 76 61 72 5f 64 75 6d 70 28 20 66 69 6c 65 5f 65 78 69 73 copy.=>.";...var_dump(.file_exis
05c0 74 73 28 24 64 65 73 74 5f 66 69 6c 65 5f 6e 61 6d 65 29 20 29 3b 0a 0a 20 20 65 63 68 6f 20 22 ts($dest_file_name).);....echo."
05e0 43 6f 70 79 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 22 3b 0a 20 20 76 61 72 5f 64 75 6d 70 28 Copy.operation.=>.";...var_dump(
0600 20 63 6f 70 79 28 24 73 72 63 5f 66 69 6c 65 5f 6e 61 6d 65 2c 20 24 64 65 73 74 5f 66 69 6c 65 .copy($src_file_name,.$dest_file
0620 5f 6e 61 6d 65 29 20 29 3b 0a 0a 20 20 65 63 68 6f 20 22 45 78 69 73 74 65 6e 63 65 20 6f 66 20 _name).);....echo."Existence.of.
0640 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 22 3b 0a 20 20 76 61 72 5f 64 75 6d destination.file.=>.";...var_dum
0660 70 28 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 64 65 73 74 5f 66 69 6c 65 5f 6e 61 6d 65 29 20 p(.file_exists($dest_file_name).
0680 29 3b 0a 0a 20 20 65 63 68 6f 20 22 44 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d );....echo."Destination.file.nam
06a0 65 20 3d 3e 20 22 3b 0a 20 20 70 72 69 6e 74 28 24 64 65 73 74 5f 66 69 6c 65 5f 6e 61 6d 65 29 e.=>.";...print($dest_file_name)
06c0 3b 0a 20 20 65 63 68 6f 20 22 5c 6e 22 3b 0a 0a 20 20 65 63 68 6f 20 22 53 69 7a 65 20 6f 66 20 ;...echo."\n";....echo."Size.of.
06e0 73 6f 75 72 63 65 20 66 69 6c 65 20 3d 3e 20 22 3b 0a 20 20 76 61 72 5f 64 75 6d 70 28 20 66 69 source.file.=>.";...var_dump(.fi
0700 6c 65 73 69 7a 65 28 24 73 72 63 5f 66 69 6c 65 5f 6e 61 6d 65 29 20 29 3b 0a 20 20 63 6c 65 61 lesize($src_file_name).);...clea
0720 72 73 74 61 74 63 61 63 68 65 28 29 3b 0a 0a 20 20 65 63 68 6f 20 22 53 69 7a 65 20 6f 66 20 64 rstatcache();....echo."Size.of.d
0740 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 22 3b 0a 20 20 76 61 72 5f 64 75 6d 70 estination.file.=>.";...var_dump
0760 28 20 66 69 6c 65 73 69 7a 65 28 24 64 65 73 74 5f 66 69 6c 65 5f 6e 61 6d 65 29 20 29 3b 0a 20 (.filesize($dest_file_name).);..
0780 20 63 6c 65 61 72 73 74 61 74 63 61 63 68 65 28 29 3b 0a 0a 20 20 75 6e 6c 69 6e 6b 28 24 64 65 .clearstatcache();....unlink($de
07a0 73 74 5f 66 69 6c 65 5f 6e 61 6d 65 29 3b 0a 0a 20 20 24 63 6f 75 6e 74 2b 2b 3b 0a 0a 7d 0a 0a st_file_name);....$count++;..}..
07c0 65 63 68 6f 20 22 2a 2a 2a 20 44 6f 6e 65 20 2a 2a 2a 5c 6e 22 3b 0a 3f 3e 0a 0a 2d 2d 43 4c 45 echo."***.Done.***\n";.?>..--CLE
07e0 41 4e 2d 2d 0a 3c 3f 70 68 70 0a 75 6e 6c 69 6e 6b 28 64 69 72 6e 61 6d 65 28 5f 5f 46 49 4c 45 AN--.<?php.unlink(dirname(__FILE
0800 5f 5f 29 2e 22 2f 63 6f 70 79 5f 76 61 72 69 61 74 69 6f 6e 34 2e 74 6d 70 22 29 3b 0a 3f 3e 0a __)."/copy_variation4.tmp");.?>.
0820 0a 2d 2d 45 58 50 45 43 54 46 2d 2d 0a 2a 2a 2a 20 54 65 73 74 20 63 6f 70 79 28 29 20 66 75 6e .--EXPECTF--.***.Test.copy().fun
0840 63 74 69 6f 6e 3a 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d 65 73 20 77 69 ction:.destination.file.names.wi
0860 74 68 20 65 6d 70 74 79 20 73 74 72 69 6e 67 2c 20 6e 75 6c 6c 73 20 26 20 62 6f 6f 6c 73 20 2a th.empty.string,.nulls.&.bools.*
0880 2a 2a 0a 53 69 7a 65 20 6f 66 20 74 68 65 20 73 6f 75 72 63 65 20 66 69 6c 65 20 62 65 66 6f 72 **.Size.of.the.source.file.befor
08a0 65 20 63 6f 70 79 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 0a 2d e.copy.operation.=>.int(1500)..-
08c0 2d 20 4e 6f 77 20 61 70 70 6c 79 69 6e 67 20 63 6f 70 79 28 29 20 6f 6e 20 73 6f 75 72 63 65 20 -.Now.applying.copy().on.source.
08e0 66 69 6c 65 20 74 6f 20 63 72 65 61 74 65 20 63 6f 70 69 65 73 20 2d 2d 0a 2d 2d 20 49 74 65 72 file.to.create.copies.--.--.Iter
0900 61 74 69 6f 6e 20 31 20 2d 2d 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 ation.1.--.Existence.of.destinat
0920 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 63 6f 70 79 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 ion.file.before.copy.=>.bool(tru
0940 65 29 0a 43 6f 70 79 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 3a 20 63 e).Copy.operation.=>..Warning:.c
0960 6f 70 79 28 29 3a 20 54 68 65 20 73 65 63 6f 6e 64 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 63 6f opy():.The.second.argument.to.co
0980 70 79 28 29 20 66 75 6e 63 74 69 6f 6e 20 63 61 6e 6e 6f 74 20 62 65 20 61 20 64 69 72 65 63 74 py().function.cannot.be.a.direct
09a0 6f 72 79 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a 62 6f 6f 6c 28 66 61 6c 73 65 29 ory.in.%s.on.line.%d.bool(false)
09c0 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d .Existence.of.destination.file.=
09e0 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 44 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 >.bool(true).Destination.file.na
0a00 6d 65 20 3d 3e 20 25 73 2f 0a 53 69 7a 65 20 6f 66 20 73 6f 75 72 63 65 20 66 69 6c 65 20 3d 3e me.=>.%s/.Size.of.source.file.=>
0a20 20 69 6e 74 28 31 35 30 30 29 0a 53 69 7a 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 .int(1500).Size.of.destination.f
0a40 69 6c 65 20 3d 3e 20 69 6e 74 28 25 64 29 0a 0a 57 61 72 6e 69 6e 67 3a 20 75 6e 6c 69 6e 6b 28 ile.=>.int(%d)..Warning:.unlink(
0a60 25 73 29 3a 20 25 73 0a 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 32 20 2d 2d 0a 45 78 69 73 74 %s):.%s..--.Iteration.2.--.Exist
0a80 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 ence.of.destination.file.before.
0aa0 63 6f 70 79 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 43 6f 70 79 20 6f 70 65 72 61 74 69 6f copy.=>.bool(true).Copy.operatio
0ac0 6e 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 3a 20 63 6f 70 79 28 29 3a 20 54 68 65 20 73 65 63 6f 6e n.=>..Warning:.copy():.The.secon
0ae0 64 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 63 6f 70 79 28 29 20 66 75 6e 63 74 69 6f 6e 20 63 61 d.argument.to.copy().function.ca
0b00 6e 6e 6f 74 20 62 65 20 61 20 64 69 72 65 63 74 6f 72 79 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e nnot.be.a.directory.in.%s.on.lin
0b20 65 20 25 64 0a 62 6f 6f 6c 28 66 61 6c 73 65 29 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 e.%d.bool(false).Existence.of.de
0b40 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 44 65 73 stination.file.=>.bool(true).Des
0b60 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d 65 20 3d 3e 20 25 73 2f 0a 53 69 7a 65 20 6f tination.file.name.=>.%s/.Size.o
0b80 66 20 73 6f 75 72 63 65 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 53 69 7a 65 20 f.source.file.=>.int(1500).Size.
0ba0 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 25 64 29 0a 0a of.destination.file.=>.int(%d)..
0bc0 57 61 72 6e 69 6e 67 3a 20 75 6e 6c 69 6e 6b 28 25 73 29 3a 20 25 73 0a 0a 2d 2d 20 49 74 65 72 Warning:.unlink(%s):.%s..--.Iter
0be0 61 74 69 6f 6e 20 33 20 2d 2d 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 ation.3.--.Existence.of.destinat
0c00 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 63 6f 70 79 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 ion.file.before.copy.=>..Warning
0c20 3a 20 66 69 6c 65 5f 65 78 69 73 74 73 28 29 20 65 78 70 65 63 74 73 20 70 61 72 61 6d 65 74 65 :.file_exists().expects.paramete
0c40 72 20 31 20 74 6f 20 62 65 20 61 20 76 61 6c 69 64 20 70 61 74 68 2c 20 73 74 72 69 6e 67 20 67 r.1.to.be.a.valid.path,.string.g
0c60 69 76 65 6e 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a 4e 55 4c 4c 0a 43 6f 70 79 20 iven.in.%s.on.line.%d.NULL.Copy.
0c80 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 3a 20 63 6f 70 79 28 29 20 65 78 operation.=>..Warning:.copy().ex
0ca0 70 65 63 74 73 20 70 61 72 61 6d 65 74 65 72 20 32 20 74 6f 20 62 65 20 61 20 76 61 6c 69 64 20 pects.parameter.2.to.be.a.valid.
0cc0 70 61 74 68 2c 20 73 74 72 69 6e 67 20 67 69 76 65 6e 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 path,.string.given.in.%s.on.line
0ce0 20 25 64 0a 4e 55 4c 4c 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f .%d.NULL.Existence.of.destinatio
0d00 6e 20 66 69 6c 65 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 3a 20 66 69 6c 65 5f 65 78 69 73 74 73 28 n.file.=>..Warning:.file_exists(
0d20 29 20 65 78 70 65 63 74 73 20 70 61 72 61 6d 65 74 65 72 20 31 20 74 6f 20 62 65 20 61 20 76 61 ).expects.parameter.1.to.be.a.va
0d40 6c 69 64 20 70 61 74 68 2c 20 73 74 72 69 6e 67 20 67 69 76 65 6e 20 69 6e 20 25 73 20 6f 6e 20 lid.path,.string.given.in.%s.on.
0d60 6c 69 6e 65 20 25 64 0a 4e 55 4c 4c 0a 44 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 line.%d.NULL.Destination.file.na
0d80 6d 65 20 3d 3e 20 25 73 2f 00 0a 53 69 7a 65 20 6f 66 20 73 6f 75 72 63 65 20 66 69 6c 65 20 3d me.=>.%s/..Size.of.source.file.=
0da0 3e 20 69 6e 74 28 31 35 30 30 29 0a 53 69 7a 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 >.int(1500).Size.of.destination.
0dc0 66 69 6c 65 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 3a 20 66 69 6c 65 73 69 7a 65 28 29 20 65 78 70 file.=>..Warning:.filesize().exp
0de0 65 63 74 73 20 70 61 72 61 6d 65 74 65 72 20 31 20 74 6f 20 62 65 20 61 20 76 61 6c 69 64 20 70 ects.parameter.1.to.be.a.valid.p
0e00 61 74 68 2c 20 73 74 72 69 6e 67 20 67 69 76 65 6e 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 ath,.string.given.in.%s.on.line.
0e20 25 64 0a 4e 55 4c 4c 0a 0a 57 61 72 6e 69 6e 67 3a 20 75 6e 6c 69 6e 6b 28 29 20 65 78 70 65 63 %d.NULL..Warning:.unlink().expec
0e40 74 73 20 70 61 72 61 6d 65 74 65 72 20 31 20 74 6f 20 62 65 20 61 20 76 61 6c 69 64 20 70 61 74 ts.parameter.1.to.be.a.valid.pat
0e60 68 2c 20 73 74 72 69 6e 67 20 67 69 76 65 6e 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 h,.string.given.in.%s.on.line.%d
0e80 0a 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 34 20 2d 2d 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 ..--.Iteration.4.--.Existence.of
0ea0 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 63 6f 70 79 20 3d 3e .destination.file.before.copy.=>
0ec0 20 62 6f 6f 6c 28 74 72 75 65 29 0a 43 6f 70 79 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 0a 57 .bool(true).Copy.operation.=>..W
0ee0 61 72 6e 69 6e 67 3a 20 63 6f 70 79 28 29 3a 20 54 68 65 20 73 65 63 6f 6e 64 20 61 72 67 75 6d arning:.copy():.The.second.argum
0f00 65 6e 74 20 74 6f 20 63 6f 70 79 28 29 20 66 75 6e 63 74 69 6f 6e 20 63 61 6e 6e 6f 74 20 62 65 ent.to.copy().function.cannot.be
0f20 20 61 20 64 69 72 65 63 74 6f 72 79 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a 62 6f .a.directory.in.%s.on.line.%d.bo
0f40 6f 6c 28 66 61 6c 73 65 29 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 ol(false).Existence.of.destinati
0f60 6f 6e 20 66 69 6c 65 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 44 65 73 74 69 6e 61 74 69 6f on.file.=>.bool(true).Destinatio
0f80 6e 20 66 69 6c 65 20 6e 61 6d 65 20 3d 3e 20 25 73 2f 0a 53 69 7a 65 20 6f 66 20 73 6f 75 72 63 n.file.name.=>.%s/.Size.of.sourc
0fa0 65 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 53 69 7a 65 20 6f 66 20 64 65 73 74 e.file.=>.int(1500).Size.of.dest
0fc0 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 25 64 29 0a 0a 57 61 72 6e 69 6e 67 ination.file.=>.int(%d)..Warning
0fe0 3a 20 75 6e 6c 69 6e 6b 28 25 73 29 3a 20 25 73 0a 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 35 :.unlink(%s):.%s..--.Iteration.5
1000 20 2d 2d 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c .--.Existence.of.destination.fil
1020 65 20 62 65 66 6f 72 65 20 63 6f 70 79 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 43 6f 70 79 e.before.copy.=>.bool(true).Copy
1040 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 0a 57 61 72 6e 69 6e 67 3a 20 63 6f 70 79 28 29 3a 20 .operation.=>..Warning:.copy():.
1060 54 68 65 20 73 65 63 6f 6e 64 20 61 72 67 75 6d 65 6e 74 20 74 6f 20 63 6f 70 79 28 29 20 66 75 The.second.argument.to.copy().fu
1080 6e 63 74 69 6f 6e 20 63 61 6e 6e 6f 74 20 62 65 20 61 20 64 69 72 65 63 74 6f 72 79 20 69 6e 20 nction.cannot.be.a.directory.in.
10a0 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a 62 6f 6f 6c 28 66 61 6c 73 65 29 0a 45 78 69 73 74 65 %s.on.line.%d.bool(false).Existe
10c0 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 62 6f 6f 6c 28 nce.of.destination.file.=>.bool(
10e0 74 72 75 65 29 0a 44 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 6e 61 6d 65 20 3d 3e 20 25 true).Destination.file.name.=>.%
1100 73 2f 0a 53 69 7a 65 20 6f 66 20 73 6f 75 72 63 65 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 31 35 s/.Size.of.source.file.=>.int(15
1120 30 30 29 0a 53 69 7a 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 00).Size.of.destination.file.=>.
1140 69 6e 74 28 25 64 29 0a 0a 57 61 72 6e 69 6e 67 3a 20 75 6e 6c 69 6e 6b 28 25 73 29 3a 20 25 73 int(%d)..Warning:.unlink(%s):.%s
1160 0a 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 36 20 2d 2d 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 ..--.Iteration.6.--.Existence.of
1180 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 63 6f 70 79 20 3d 3e .destination.file.before.copy.=>
11a0 20 62 6f 6f 6c 28 66 61 6c 73 65 29 0a 43 6f 70 79 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 62 .bool(false).Copy.operation.=>.b
11c0 6f 6f 6c 28 74 72 75 65 29 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 ool(true).Existence.of.destinati
11e0 6f 6e 20 66 69 6c 65 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 44 65 73 74 69 6e 61 74 69 6f on.file.=>.bool(true).Destinatio
1200 6e 20 66 69 6c 65 20 6e 61 6d 65 20 3d 3e 20 25 73 2f 31 0a 53 69 7a 65 20 6f 66 20 73 6f 75 72 n.file.name.=>.%s/1.Size.of.sour
1220 63 65 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 53 69 7a 65 20 6f 66 20 64 65 73 ce.file.=>.int(1500).Size.of.des
1240 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 0a 2d 2d 20 49 tination.file.=>.int(1500)..--.I
1260 74 65 72 61 74 69 6f 6e 20 37 20 2d 2d 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 teration.7.--.Existence.of.desti
1280 6e 61 74 69 6f 6e 20 66 69 6c 65 20 62 65 66 6f 72 65 20 63 6f 70 79 20 3d 3e 20 62 6f 6f 6c 28 nation.file.before.copy.=>.bool(
12a0 66 61 6c 73 65 29 0a 43 6f 70 79 20 6f 70 65 72 61 74 69 6f 6e 20 3d 3e 20 62 6f 6f 6c 28 74 72 false).Copy.operation.=>.bool(tr
12c0 75 65 29 0a 45 78 69 73 74 65 6e 63 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c ue).Existence.of.destination.fil
12e0 65 20 3d 3e 20 62 6f 6f 6c 28 74 72 75 65 29 0a 44 65 73 74 69 6e 61 74 69 6f 6e 20 66 69 6c 65 e.=>.bool(true).Destination.file
1300 20 6e 61 6d 65 20 3d 3e 20 25 73 2f 31 0a 53 69 7a 65 20 6f 66 20 73 6f 75 72 63 65 20 66 69 6c .name.=>.%s/1.Size.of.source.fil
1320 65 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 53 69 7a 65 20 6f 66 20 64 65 73 74 69 6e 61 74 69 e.=>.int(1500).Size.of.destinati
1340 6f 6e 20 66 69 6c 65 20 3d 3e 20 69 6e 74 28 31 35 30 30 29 0a 2a 2a 2a 20 44 6f 6e 65 20 2a 2a on.file.=>.int(1500).***.Done.**
1360 2a 0a *.