Commit | Line | Data |
---|---|---|
3d7bec80 H |
1 | #!/usr/bin/env perl |
2 | ||
3 | use Fuse; | |
4 | ||
5 | #use JSON; | |
6 | #print encode_json {}; | |
7 | ||
8 | my ($mountpoint) = ""; | |
9 | $mountpoint = shift(@ARGV) if @ARGV; | |
10 | Fuse::main(mountpoint=>$mountpoint, getattr=>"main::my_getattr", getdir=>"main::my_getdir"); | |
11 | ||
12 | sub my_getattr { | |
13 | #($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) | |
14 | #return (1,1,0777,1,0,0,1,1,1,1,1,1,1); | |
15 | my ($size) = 1024; | |
16 | my ($modes) = (0040<<9) + 0755; #dir=0040, file=0100 | |
17 | my ($dev, $ino, $rdev, $blocks, $gid, $uid, $nlink, $blksize) = (0,0,0,1,0,0,1,1024); | |
18 | my ($atime, $ctime, $mtime); | |
19 | $atime = $ctime = $mtime = 666666; | |
20 | return ($dev,$ino,$modes,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks); | |
21 | } | |
22 | ||
23 | sub my_getdir { | |
24 | return ('.', 'a', 'b', 0); | |
25 | } |