dartssh2
dartssh2 copied to clipboard
file size is not correct
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:
I am using dartssh2: ^2.7.2+3
and flutter sdk: ">=2.17.6 <3.0.0"
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