I'm seeing some weird behavior. Got this line:
my @stats = stat($f);
$f is the path to a file sitting on an amazon s3 bucket. I am using s3fs to mount the bucket on my instance and the path to the file looks like a normal path, something like: /backups/backups_db/some_dir/file. The backups_db is a symlink to /s3bucket/backups_db
At any rate, @stats contains values from the stat() function above but in totally random order. Here's a dump of three different files:
[DEBUG] Rex.CLI: 206
$VAR1 = [
'gid',
1000,
'size',
325342,
'mode',
'0644',
'mtime',
1623769844,
'uid',
1000,
'atime',
0
];
[DEBUG] Rex.CLI: 206
$VAR1 = [
'uid',
1000,
'size',
325316,
'atime',
0,
'gid',
1000,
'mode',
'0644',
'mtime',
1623771735
];
[DEBUG] Rex.CLI: 206
$VAR1 = [
'gid',
1000,
'mtime',
1623772143,
'mode',
'0644',
'atime',
0,
'uid',
1000,
'size',
325346
];
I'm not sure if I'm just being an idiot on how to use the stat() function or if the stat() function does not work properly on a file on an s3 bucket using s3fs. If it's the latter, can this be fixed?