dartssh2 icon indicating copy to clipboard operation
dartssh2 copied to clipboard

file size is not correct

Open seifalmotaz opened this issue 2 years ago • 1 comments

I am using dartssh2 and I am trying to get the file size with sftp but it displaying 4096 almost all the time sometimes i get another number but still not correct if run the command du -h --max-depth=1 | sort -hr it prints out:

root@test-server:~# du -h --max-depth=1 | sort -hr
44K     .
16K     ./snap
4.0K    ./.ssh
4.0K    ./.cache

but in my program:

image

I am using dartssh2: ^2.7.2+3 and flutter sdk: ">=2.17.6 <3.0.0"

seifalmotaz avatar Aug 07 '22 20:08 seifalmotaz

Not sure, but I believe that this is expected for folders, dartssh uses ls -l

root@test-server:~# ls -l
-rwxr-xr-x  21 francxpt francxpt      20480 Aug 26 15:42 vmlinux.symvers
-rw-r--r--   1 francxpt francxpt     624908 Aug 26 15:59 Module.symvers
drwxr-xr-x  26 francxpt francxpt       4096 Aug 26 16:00 arch
drwxr-xr-x  27 francxpt francxpt       4096 Aug 26 15:35 sound
drwxr-xr-x  31 francxpt francxpt       4096 Aug 26 15:32 include
drwxr-xr-x  34 francxpt francxpt       4096 Aug  1 23:44 samples
drwxr-xr-x  38 francxpt francxpt       4096 Aug  1 23:44 tools
drwxr-xr-x  72 francxpt francxpt       4096 Aug 26 15:47 net

FrancXPT avatar Nov 07 '22 16:11 FrancXPT