windows - How can I use cygwin's stat() via perl? -
a little background here:
here's version of stat cygwin has:
$ stat --version stat (gnu coreutils) 8.4 packaged cygwin (8.4-2) copyright (c) 2010 free software foundation, inc. license gplv3+: gnu gpl version 3 or later <http://gnu.org/licenses/gpl.html>. free software: free change , redistribute it. there no warranty, extent permitted law. written michael meskes.
this seems packaged cygwin.
when use stat give me metadata file, , points out symbolic links like:
$ stat mylink
file:
mylink' ->
/users/abcdefg/documents' size: 26
blocks: 1 io block: 65536 symbolic link device: sdfdfsd/323sdfd5682d inode: 61080069946278219 links: 1 access: (0777/lrwxrwxrwx) uid: ( 1000/ root) gid: ( 544/administrators) access: 2014-03-14 16:32:44.002593300 +0000 modify: 2014-05-14 16:32:44.002593300 +0000 change: 2014-02-14 16:32:44.002593300 +0000
however, when stat or lstat using file::stat in perl, , bitmask $mode value stat obtain file type , permissions, value tells me file mylink "regular file". when cat on link, identifies directory.
i'm trying figure out, how use cygwin packaged 'stat' module through perl file. ideas?
Comments
Post a Comment