Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: existence of a file on remote host

by ChrisR (Hermit)
on Sep 01, 2005 at 14:10 UTC ( [id://488381]=note: print w/replies, xml ) Need Help??


in reply to existence of a file on remote host

perldoc perlvms</code>
File tests The tests "-b", "-B", "-c", "-C", "-d", "-e", "-f", "-o", "-M", "-s", "-S", "-t", "-T", and "-z" work as advertised. The return values for "-r", "-w", and "-x" tell you whether you can actually access the file; this may not reflect the UIC-based file protec- tions. Since real and effective UIC don't differ under VMS, "-O", "-R", "-W", and "-X" are equivalent to "-o", "-r", "-w", and "-x". Similarly, several other tests, including "-A", "-g", "-k", "-l", "-p", and "-u", aren't particularly meaningful under VMS, and the values returned by these tests reflect whatever your CRTL "stat()" routine does to the equivalent bits in the st_mode field. Finally, "-d" returns true if passed a device specification without an explicit directory (e.g. "DUA1:"), as well as if passed a direc- tory. Note: Some sites have reported problems when using the file-access tests ("-r", "-w", and "-x") on files accessed via DEC's DFS. Specifically, since DFS does not currently provide access to the extended file header of files on remote volumes, attempts to exam- ine the ACL fail, and the file tests will return false, with $! indicating that the file does not exist. You can use "stat" on these files, since that checks UIC-based protection only, and then manually check the appropriate bits, as defined by your C com- piler's stat.h, in the mode value it returns, if you need an approximation of the file's protections.
update: Never mind

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://488381]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-24 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found