The stupid question is the question not asked | |
PerlMonks |
Re: How to copy/cut and paste files without using modules ?by Marshall (Canon) |
on Oct 20, 2011 at 05:28 UTC ( [id://932568]=note: print w/replies, xml ) | Need Help?? |
I just learned I can use unlink to delete files I think you do not understand how a directory works. A common misperception is that a file "exists within a directory". No!
A file is a sequence of bits. There is a way to have different text values point to the same sequence of bits. Its just that simple. I am confused as to what you are asking about. "unlink X;" means literally to disconnect the pointer that the name X describes to a file. There could be another name 'Y' that points to the same file (which is a sequence of bits on hard disk), 'Y' or 'X' is essentially a starting number of the "nth bit" on the hard drive. So this does not mean "delete the file" on the disk.
"Unlink" means "disconnect my text pointer to that sequence of bits on the disk". Anyway, please explain your question in more detail!
In Section
Seekers of Perl Wisdom
|
|