From cda92feafcc1db644bafb9b61f0710fbc24457c6 Mon Sep 17 00:00:00 2001 From: Joshua Blum Date: Tue, 12 Feb 2019 09:38:56 -0500 Subject: [PATCH] cache dir size (#15990) * cache dir size * reorg, gendeps --- go/.go_package_deps_darwin | 78 +++++++++++++++++++++++++- go/.go_package_deps_linux | 77 ++++++++++++++++++++++++- go/.go_package_deps_windows | 76 ++++++++++++++++++++++++- go/client/cmd_status.go | 6 ++ go/libkb/status.go | 3 + go/libkb/util.go | 47 ++++++++++++++++ go/protocol/keybase1/config.go | 24 ++++++++ go/utils/dir_size.go | 20 +++++++ protocol/avdl/keybase1/config.avdl | 7 +++ protocol/json/keybase1/config.json | 21 +++++++ shared/constants/types/rpc-gen.js.flow | 3 +- 11 files changed, 358 insertions(+), 4 deletions(-) create mode 100644 go/utils/dir_size.go diff --git a/go/.go_package_deps_darwin b/go/.go_package_deps_darwin index c1c27a5a314d..9339fd02f95e 100644 --- a/go/.go_package_deps_darwin +++ b/go/.go_package_deps_darwin @@ -3551,9 +3551,85 @@ "github.com/keybase/client/go/chat/signencrypt/example" : 1 }, "github.com/keybase/client/go/vendor/github.com/dustin/go-humanize" : { + "github.com/keybase/client/go/auth" : 1, + "github.com/keybase/client/go/avatars" : 1, + "github.com/keybase/client/go/badges" : 1, + "github.com/keybase/client/go/chat" : 1, + "github.com/keybase/client/go/chat/attachments" : 1, + "github.com/keybase/client/go/chat/commands" : 1, + "github.com/keybase/client/go/chat/globals" : 1, + "github.com/keybase/client/go/chat/search" : 1, + "github.com/keybase/client/go/chat/signencrypt" : 1, + "github.com/keybase/client/go/chat/signencrypt/example" : 1, + "github.com/keybase/client/go/chat/storage" : 1, + "github.com/keybase/client/go/chat/types" : 1, + "github.com/keybase/client/go/chat/unfurl" : 1, + "github.com/keybase/client/go/chat/unfurl/display" : 1, + "github.com/keybase/client/go/chat/unfurl/scraper" : 1, + "github.com/keybase/client/go/chat/utils" : 1, + "github.com/keybase/client/go/chat/wallet" : 1, "github.com/keybase/client/go/client" : 1, + "github.com/keybase/client/go/emails" : 1, + "github.com/keybase/client/go/encrypteddb" : 1, + "github.com/keybase/client/go/engine" : 1, + "github.com/keybase/client/go/ephemeral" : 1, + "github.com/keybase/client/go/erasablekv" : 1, + "github.com/keybase/client/go/externals" : 1, + "github.com/keybase/client/go/externalstest" : 1, + "github.com/keybase/client/go/git" : 1, + "github.com/keybase/client/go/gregor/storage" : 1, + "github.com/keybase/client/go/gregor/utils" : 1, + "github.com/keybase/client/go/home" : 1, + "github.com/keybase/client/go/identify3" : 1, + "github.com/keybase/client/go/install" : 1, + "github.com/keybase/client/go/install/libnativeinstaller" : 1, + "github.com/keybase/client/go/kbfs/env" : 1, + "github.com/keybase/client/go/kbfs/fsrpc" : 1, + "github.com/keybase/client/go/kbfs/kbfsblock" : 1, + "github.com/keybase/client/go/kbfs/kbfscrypto" : 1, + "github.com/keybase/client/go/kbfs/kbfsdokan" : 1, + "github.com/keybase/client/go/kbfs/kbfsedits" : 1, + "github.com/keybase/client/go/kbfs/kbfsfuse" : 1, + "github.com/keybase/client/go/kbfs/kbfsgit" : 1, + "github.com/keybase/client/go/kbfs/kbfsgit/git-remote-keybase" : 1, + "github.com/keybase/client/go/kbfs/kbfsmd" : 1, + "github.com/keybase/client/go/kbfs/kbfstool" : 1, + "github.com/keybase/client/go/kbfs/kbpagesd" : 1, + "github.com/keybase/client/go/kbfs/libdokan" : 1, + "github.com/keybase/client/go/kbfs/libfs" : 1, + "github.com/keybase/client/go/kbfs/libfuse" : 1, + "github.com/keybase/client/go/kbfs/libgit" : 1, + "github.com/keybase/client/go/kbfs/libhttpserver" : 1, + "github.com/keybase/client/go/kbfs/libkbfs" : 1, + "github.com/keybase/client/go/kbfs/libpages" : 1, + "github.com/keybase/client/go/kbfs/simplefs" : 1, + "github.com/keybase/client/go/kbfs/test" : 1, + "github.com/keybase/client/go/kbfs/tlf" : 1, + "github.com/keybase/client/go/kbtest" : 1, "github.com/keybase/client/go/keybase" : 1, - "github.com/keybase/client/go/systests" : 1 + "github.com/keybase/client/go/launchd" : 1, + "github.com/keybase/client/go/libcmdline" : 1, + "github.com/keybase/client/go/libkb" : 1, + "github.com/keybase/client/go/lru" : 1, + "github.com/keybase/client/go/merklestore" : 1, + "github.com/keybase/client/go/phonenumbers" : 1, + "github.com/keybase/client/go/pvl" : 1, + "github.com/keybase/client/go/saltpackkeys" : 1, + "github.com/keybase/client/go/service" : 1, + "github.com/keybase/client/go/stellar" : 1, + "github.com/keybase/client/go/stellar/bundle" : 1, + "github.com/keybase/client/go/stellar/relays" : 1, + "github.com/keybase/client/go/stellar/remote" : 1, + "github.com/keybase/client/go/stellar/stellarcommon" : 1, + "github.com/keybase/client/go/stellar/stellargregor" : 1, + "github.com/keybase/client/go/stellar/stellarsvc" : 1, + "github.com/keybase/client/go/systests" : 1, + "github.com/keybase/client/go/teams" : 1, + "github.com/keybase/client/go/tlfupgrade" : 1, + "github.com/keybase/client/go/tools/sigchain" : 1, + "github.com/keybase/client/go/tools/ssss" : 1, + "github.com/keybase/client/go/tools/teamchain" : 1, + "github.com/keybase/client/go/uidmap" : 1 }, "github.com/keybase/client/go/vendor/github.com/eapache/channels" : { "github.com/keybase/client/go/kbfs/fsrpc" : 1, diff --git a/go/.go_package_deps_linux b/go/.go_package_deps_linux index 64710c232808..3c82d2f85f76 100644 --- a/go/.go_package_deps_linux +++ b/go/.go_package_deps_linux @@ -3741,9 +3741,84 @@ "github.com/keybase/client/go/chat/signencrypt/example" : 1 }, "github.com/keybase/client/go/vendor/github.com/dustin/go-humanize" : { + "github.com/keybase/client/go/auth" : 1, + "github.com/keybase/client/go/avatars" : 1, + "github.com/keybase/client/go/badges" : 1, + "github.com/keybase/client/go/chat" : 1, + "github.com/keybase/client/go/chat/attachments" : 1, + "github.com/keybase/client/go/chat/commands" : 1, + "github.com/keybase/client/go/chat/globals" : 1, + "github.com/keybase/client/go/chat/search" : 1, + "github.com/keybase/client/go/chat/signencrypt" : 1, + "github.com/keybase/client/go/chat/signencrypt/example" : 1, + "github.com/keybase/client/go/chat/storage" : 1, + "github.com/keybase/client/go/chat/types" : 1, + "github.com/keybase/client/go/chat/unfurl" : 1, + "github.com/keybase/client/go/chat/unfurl/display" : 1, + "github.com/keybase/client/go/chat/unfurl/scraper" : 1, + "github.com/keybase/client/go/chat/utils" : 1, + "github.com/keybase/client/go/chat/wallet" : 1, "github.com/keybase/client/go/client" : 1, + "github.com/keybase/client/go/emails" : 1, + "github.com/keybase/client/go/encrypteddb" : 1, + "github.com/keybase/client/go/engine" : 1, + "github.com/keybase/client/go/ephemeral" : 1, + "github.com/keybase/client/go/erasablekv" : 1, + "github.com/keybase/client/go/externals" : 1, + "github.com/keybase/client/go/externalstest" : 1, + "github.com/keybase/client/go/git" : 1, + "github.com/keybase/client/go/gregor/storage" : 1, + "github.com/keybase/client/go/gregor/utils" : 1, + "github.com/keybase/client/go/home" : 1, + "github.com/keybase/client/go/identify3" : 1, + "github.com/keybase/client/go/install" : 1, + "github.com/keybase/client/go/install/libnativeinstaller" : 1, + "github.com/keybase/client/go/kbfs/env" : 1, + "github.com/keybase/client/go/kbfs/fsrpc" : 1, + "github.com/keybase/client/go/kbfs/kbfsblock" : 1, + "github.com/keybase/client/go/kbfs/kbfscrypto" : 1, + "github.com/keybase/client/go/kbfs/kbfsdokan" : 1, + "github.com/keybase/client/go/kbfs/kbfsedits" : 1, + "github.com/keybase/client/go/kbfs/kbfsfuse" : 1, + "github.com/keybase/client/go/kbfs/kbfsgit" : 1, + "github.com/keybase/client/go/kbfs/kbfsgit/git-remote-keybase" : 1, + "github.com/keybase/client/go/kbfs/kbfsmd" : 1, + "github.com/keybase/client/go/kbfs/kbfstool" : 1, + "github.com/keybase/client/go/kbfs/kbpagesd" : 1, + "github.com/keybase/client/go/kbfs/libdokan" : 1, + "github.com/keybase/client/go/kbfs/libfs" : 1, + "github.com/keybase/client/go/kbfs/libfuse" : 1, + "github.com/keybase/client/go/kbfs/libgit" : 1, + "github.com/keybase/client/go/kbfs/libhttpserver" : 1, + "github.com/keybase/client/go/kbfs/libkbfs" : 1, + "github.com/keybase/client/go/kbfs/libpages" : 1, + "github.com/keybase/client/go/kbfs/simplefs" : 1, + "github.com/keybase/client/go/kbfs/test" : 1, + "github.com/keybase/client/go/kbfs/tlf" : 1, + "github.com/keybase/client/go/kbtest" : 1, "github.com/keybase/client/go/keybase" : 1, - "github.com/keybase/client/go/systests" : 1 + "github.com/keybase/client/go/libcmdline" : 1, + "github.com/keybase/client/go/libkb" : 1, + "github.com/keybase/client/go/lru" : 1, + "github.com/keybase/client/go/merklestore" : 1, + "github.com/keybase/client/go/phonenumbers" : 1, + "github.com/keybase/client/go/pvl" : 1, + "github.com/keybase/client/go/saltpackkeys" : 1, + "github.com/keybase/client/go/service" : 1, + "github.com/keybase/client/go/stellar" : 1, + "github.com/keybase/client/go/stellar/bundle" : 1, + "github.com/keybase/client/go/stellar/relays" : 1, + "github.com/keybase/client/go/stellar/remote" : 1, + "github.com/keybase/client/go/stellar/stellarcommon" : 1, + "github.com/keybase/client/go/stellar/stellargregor" : 1, + "github.com/keybase/client/go/stellar/stellarsvc" : 1, + "github.com/keybase/client/go/systests" : 1, + "github.com/keybase/client/go/teams" : 1, + "github.com/keybase/client/go/tlfupgrade" : 1, + "github.com/keybase/client/go/tools/sigchain" : 1, + "github.com/keybase/client/go/tools/ssss" : 1, + "github.com/keybase/client/go/tools/teamchain" : 1, + "github.com/keybase/client/go/uidmap" : 1 }, "github.com/keybase/client/go/vendor/github.com/eapache/channels" : { "github.com/keybase/client/go/kbfs/fsrpc" : 1, diff --git a/go/.go_package_deps_windows b/go/.go_package_deps_windows index 2a2cb17e4f63..87611190fe3f 100644 --- a/go/.go_package_deps_windows +++ b/go/.go_package_deps_windows @@ -3498,9 +3498,83 @@ "github.com/keybase/client/go/chat/signencrypt/example" : 1 }, "github.com/keybase/client/go/vendor/github.com/dustin/go-humanize" : { + "github.com/keybase/client/go/auth" : 1, + "github.com/keybase/client/go/avatars" : 1, + "github.com/keybase/client/go/badges" : 1, + "github.com/keybase/client/go/chat" : 1, + "github.com/keybase/client/go/chat/attachments" : 1, + "github.com/keybase/client/go/chat/commands" : 1, + "github.com/keybase/client/go/chat/globals" : 1, + "github.com/keybase/client/go/chat/search" : 1, + "github.com/keybase/client/go/chat/signencrypt" : 1, + "github.com/keybase/client/go/chat/signencrypt/example" : 1, + "github.com/keybase/client/go/chat/storage" : 1, + "github.com/keybase/client/go/chat/types" : 1, + "github.com/keybase/client/go/chat/unfurl" : 1, + "github.com/keybase/client/go/chat/unfurl/display" : 1, + "github.com/keybase/client/go/chat/unfurl/scraper" : 1, + "github.com/keybase/client/go/chat/utils" : 1, + "github.com/keybase/client/go/chat/wallet" : 1, "github.com/keybase/client/go/client" : 1, + "github.com/keybase/client/go/emails" : 1, + "github.com/keybase/client/go/encrypteddb" : 1, + "github.com/keybase/client/go/engine" : 1, + "github.com/keybase/client/go/ephemeral" : 1, + "github.com/keybase/client/go/erasablekv" : 1, + "github.com/keybase/client/go/externals" : 1, + "github.com/keybase/client/go/externalstest" : 1, + "github.com/keybase/client/go/git" : 1, + "github.com/keybase/client/go/gregor/storage" : 1, + "github.com/keybase/client/go/gregor/utils" : 1, + "github.com/keybase/client/go/home" : 1, + "github.com/keybase/client/go/identify3" : 1, + "github.com/keybase/client/go/install" : 1, + "github.com/keybase/client/go/install/libnativeinstaller" : 1, + "github.com/keybase/client/go/kbfs/env" : 1, + "github.com/keybase/client/go/kbfs/fsrpc" : 1, + "github.com/keybase/client/go/kbfs/kbfsblock" : 1, + "github.com/keybase/client/go/kbfs/kbfscrypto" : 1, + "github.com/keybase/client/go/kbfs/kbfsdokan" : 1, + "github.com/keybase/client/go/kbfs/kbfsedits" : 1, + "github.com/keybase/client/go/kbfs/kbfsgit" : 1, + "github.com/keybase/client/go/kbfs/kbfsgit/git-remote-keybase" : 1, + "github.com/keybase/client/go/kbfs/kbfsmd" : 1, + "github.com/keybase/client/go/kbfs/kbfstool" : 1, + "github.com/keybase/client/go/kbfs/kbpagesd" : 1, + "github.com/keybase/client/go/kbfs/libdokan" : 1, + "github.com/keybase/client/go/kbfs/libfs" : 1, + "github.com/keybase/client/go/kbfs/libgit" : 1, + "github.com/keybase/client/go/kbfs/libhttpserver" : 1, + "github.com/keybase/client/go/kbfs/libkbfs" : 1, + "github.com/keybase/client/go/kbfs/libpages" : 1, + "github.com/keybase/client/go/kbfs/simplefs" : 1, + "github.com/keybase/client/go/kbfs/test" : 1, + "github.com/keybase/client/go/kbfs/tlf" : 1, + "github.com/keybase/client/go/kbtest" : 1, "github.com/keybase/client/go/keybase" : 1, - "github.com/keybase/client/go/systests" : 1 + "github.com/keybase/client/go/libcmdline" : 1, + "github.com/keybase/client/go/libkb" : 1, + "github.com/keybase/client/go/lru" : 1, + "github.com/keybase/client/go/merklestore" : 1, + "github.com/keybase/client/go/phonenumbers" : 1, + "github.com/keybase/client/go/pvl" : 1, + "github.com/keybase/client/go/saltpackkeys" : 1, + "github.com/keybase/client/go/service" : 1, + "github.com/keybase/client/go/stellar" : 1, + "github.com/keybase/client/go/stellar/bundle" : 1, + "github.com/keybase/client/go/stellar/relays" : 1, + "github.com/keybase/client/go/stellar/remote" : 1, + "github.com/keybase/client/go/stellar/stellarcommon" : 1, + "github.com/keybase/client/go/stellar/stellargregor" : 1, + "github.com/keybase/client/go/stellar/stellarsvc" : 1, + "github.com/keybase/client/go/systests" : 1, + "github.com/keybase/client/go/teams" : 1, + "github.com/keybase/client/go/tlfupgrade" : 1, + "github.com/keybase/client/go/tools/sigchain" : 1, + "github.com/keybase/client/go/tools/ssss" : 1, + "github.com/keybase/client/go/tools/teamchain" : 1, + "github.com/keybase/client/go/tools/winresource" : 1, + "github.com/keybase/client/go/uidmap" : 1 }, "github.com/keybase/client/go/vendor/github.com/eapache/channels" : { "github.com/keybase/client/go/kbfs/fsrpc" : 1, diff --git a/go/client/cmd_status.go b/go/client/cmd_status.go index 79add3e95ecc..a8d814022166 100644 --- a/go/client/cmd_status.go +++ b/go/client/cmd_status.go @@ -105,6 +105,7 @@ type fstatus struct { DeviceEKNames []string LocalDbStats []string LocalChatDbStats []string + CacheDirSizeInfo []keybase1.DirSizeInfo } func (c *CmdStatus) Run() error { @@ -218,6 +219,7 @@ func (c *CmdStatus) load() (*fstatus, error) { status.DeviceEKNames = extStatus.DeviceEkNames status.LocalDbStats = extStatus.LocalDbStats status.LocalChatDbStats = extStatus.LocalChatDbStats + status.CacheDirSizeInfo = extStatus.CacheDirSizeInfo // set anything os-specific: if err := c.osSpecific(&status); err != nil { @@ -317,6 +319,10 @@ func (c *CmdStatus) outputTerminal(status *fstatus) error { dui.Printf(" %s \n", strings.Join(status.DeviceEKNames, "\n ")) dui.Printf("LocalDbStats:\n%s \n", strings.Join(status.LocalDbStats, "\n")) dui.Printf("LocalChatDbStats:\n%s \n", strings.Join(status.LocalChatDbStats, "\n")) + dui.Printf("CacheDirSizeInfo:\n") + for _, dirInfo := range status.CacheDirSizeInfo { + dui.Printf("%s: %s\n", dirInfo.Name, dirInfo.HumanSize) + } c.outputClients(dui, status.Clients) return nil diff --git a/go/libkb/status.go b/go/libkb/status.go index 03ceb30ac28c..09b89691b75a 100644 --- a/go/libkb/status.go +++ b/go/libkb/status.go @@ -133,6 +133,9 @@ func GetExtendedStatus(m MetaContext) (res keybase1.ExtendedStatus, err error) { res.LocalDbStats = strings.Split(g.LocalDb.Stats(), "\n") res.LocalChatDbStats = strings.Split(g.LocalChatDb.Stats(), "\n") + if cacheSizeInfo, err := CacheSizeInfo(g); err == nil { + res.CacheDirSizeInfo = cacheSizeInfo + } return res, nil } diff --git a/go/libkb/util.go b/go/libkb/util.go index 07b4b1febfc5..d6ca596bff8b 100644 --- a/go/libkb/util.go +++ b/go/libkb/util.go @@ -28,6 +28,7 @@ import ( "time" "unicode" + humanize "github.com/dustin/go-humanize" "github.com/keybase/client/go/kbcrypto" "github.com/keybase/client/go/logger" "github.com/keybase/client/go/profiling" @@ -981,3 +982,49 @@ func RuntimeGroup() keybase1.RuntimeGroup { return keybase1.RuntimeGroup_UNKNOWN } } + +// DirSize walks the file tree the size of the given directory +func DirSize(dirPath string) (size uint64, err error) { + err = filepath.Walk(dirPath, func(_ string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if !info.IsDir() { + size += uint64(info.Size()) + } + return nil + }) + return size, err +} + +func CacheSizeInfo(g *GlobalContext) (info []keybase1.DirSizeInfo, err error) { + cacheDir := g.GetCacheDir() + files, err := ioutil.ReadDir(cacheDir) + if err != nil { + return nil, err + } + + var totalSize uint64 + for _, file := range files { + if !file.IsDir() { + totalSize += uint64(file.Size()) + continue + } + dirPath := filepath.Join(cacheDir, file.Name()) + size, err := DirSize(dirPath) + if err != nil { + return nil, err + } + totalSize += size + info = append(info, keybase1.DirSizeInfo{ + Name: dirPath, + HumanSize: humanize.Bytes(size), + }) + } + info = append(info, keybase1.DirSizeInfo{ + Name: cacheDir, + HumanSize: humanize.Bytes(totalSize), + }) + return info, nil + +} diff --git a/go/protocol/keybase1/config.go b/go/protocol/keybase1/config.go index 9608eabb86a0..975f9f67050d 100644 --- a/go/protocol/keybase1/config.go +++ b/go/protocol/keybase1/config.go @@ -106,6 +106,18 @@ func (o LoadDeviceErr) DeepCopy() LoadDeviceErr { } } +type DirSizeInfo struct { + Name string `codec:"name" json:"name"` + HumanSize string `codec:"humanSize" json:"humanSize"` +} + +func (o DirSizeInfo) DeepCopy() DirSizeInfo { + return DirSizeInfo{ + Name: o.Name, + HumanSize: o.HumanSize, + } +} + type ExtendedStatus struct { Standalone bool `codec:"standalone" json:"standalone"` PassphraseStreamCached bool `codec:"passphraseStreamCached" json:"passphraseStreamCached"` @@ -129,6 +141,7 @@ type ExtendedStatus struct { DefaultDeviceID DeviceID `codec:"defaultDeviceID" json:"defaultDeviceID"` LocalDbStats []string `codec:"localDbStats" json:"localDbStats"` LocalChatDbStats []string `codec:"localChatDbStats" json:"localChatDbStats"` + CacheDirSizeInfo []DirSizeInfo `codec:"cacheDirSizeInfo" json:"cacheDirSizeInfo"` } func (o ExtendedStatus) DeepCopy() ExtendedStatus { @@ -223,6 +236,17 @@ func (o ExtendedStatus) DeepCopy() ExtendedStatus { } return ret })(o.LocalChatDbStats), + CacheDirSizeInfo: (func(x []DirSizeInfo) []DirSizeInfo { + if x == nil { + return nil + } + ret := make([]DirSizeInfo, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.CacheDirSizeInfo), } } diff --git a/go/utils/dir_size.go b/go/utils/dir_size.go new file mode 100644 index 000000000000..97cb9af80fda --- /dev/null +++ b/go/utils/dir_size.go @@ -0,0 +1,20 @@ +package utils + +import ( + "os" + "path/filepath" +) + +// DirSize walks the file tree the size of the given directory +func DirSize(dirPath string) (size uint64, err error) { + err = filepath.Walk(dirPath, func(_ string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if !info.IsDir() { + size += uint64(info.Size()) + } + return nil + }) + return size, err +} diff --git a/protocol/avdl/keybase1/config.avdl b/protocol/avdl/keybase1/config.avdl index e0fe6f2d097e..a9e286684381 100644 --- a/protocol/avdl/keybase1/config.avdl +++ b/protocol/avdl/keybase1/config.avdl @@ -47,6 +47,12 @@ protocol config { string desc; } + record DirSizeInfo { + string name; + string humanSize; + } + + record ExtendedStatus { boolean standalone; boolean passphraseStreamCached; @@ -72,6 +78,7 @@ protocol config { in the config file. */ array localDbStats; array localChatDbStats; + array cacheDirSizeInfo; } ExtendedStatus getExtendedStatus(int sessionID); diff --git a/protocol/json/keybase1/config.json b/protocol/json/keybase1/config.json index 106112d8c342..6ac2656f3ef7 100644 --- a/protocol/json/keybase1/config.json +++ b/protocol/json/keybase1/config.json @@ -132,6 +132,20 @@ } ] }, + { + "type": "record", + "name": "DirSizeInfo", + "fields": [ + { + "type": "string", + "name": "name" + }, + { + "type": "string", + "name": "humanSize" + } + ] + }, { "type": "record", "name": "ExtendedStatus", @@ -248,6 +262,13 @@ "items": "string" }, "name": "localChatDbStats" + }, + { + "type": { + "type": "array", + "items": "DirSizeInfo" + }, + "name": "cacheDirSizeInfo" } ] }, diff --git a/shared/constants/types/rpc-gen.js.flow b/shared/constants/types/rpc-gen.js.flow index ca136491b290..b3488c9f680d 100644 --- a/shared/constants/types/rpc-gen.js.flow +++ b/shared/constants/types/rpc-gen.js.flow @@ -2000,6 +2000,7 @@ export type DeviceType = | 0 // DESKTOP_0 | 1 // MOBILE_1 +export type DirSizeInfo = $ReadOnly<{name: String, humanSize: String}> export type Dirent = $ReadOnly<{time: Time, size: Int, name: String, direntType: DirentType, lastWriterUnverified: User, writable: Boolean, prefetchStatus: PrefetchStatus, prefetchProgress: PrefetchProgress}> export type DirentType = | 0 // FILE_0 @@ -2031,7 +2032,7 @@ export type ExitCode = | 2 // NOTOK_2 | 4 // RESTART_4 -export type ExtendedStatus = $ReadOnly<{standalone: Boolean, passphraseStreamCached: Boolean, tsecCached: Boolean, deviceSigKeyCached: Boolean, deviceEncKeyCached: Boolean, paperSigKeyCached: Boolean, paperEncKeyCached: Boolean, storedSecret: Boolean, secretPromptSkip: Boolean, rememberPassphrase: Boolean, device?: ?Device, deviceErr?: ?LoadDeviceErr, logDir: String, session?: ?SessionStatus, defaultUsername: String, provisionedUsernames?: ?Array, Clients?: ?Array, deviceEkNames?: ?Array, platformInfo: PlatformInfo, defaultDeviceID: DeviceID, localDbStats?: ?Array, localChatDbStats?: ?Array}> +export type ExtendedStatus = $ReadOnly<{standalone: Boolean, passphraseStreamCached: Boolean, tsecCached: Boolean, deviceSigKeyCached: Boolean, deviceEncKeyCached: Boolean, paperSigKeyCached: Boolean, paperEncKeyCached: Boolean, storedSecret: Boolean, secretPromptSkip: Boolean, rememberPassphrase: Boolean, device?: ?Device, deviceErr?: ?LoadDeviceErr, logDir: String, session?: ?SessionStatus, defaultUsername: String, provisionedUsernames?: ?Array, Clients?: ?Array, deviceEkNames?: ?Array, platformInfo: PlatformInfo, defaultDeviceID: DeviceID, localDbStats?: ?Array, localChatDbStats?: ?Array, cacheDirSizeInfo?: ?Array}> export type ExternalServiceConfig = $ReadOnly<{schemaVersion: Int, display?: ?ServiceDisplayConfig, config?: ?ParamProofServiceConfig}> export type FSEditListRequest = $ReadOnly<{folder: Folder, requestID: Int}> export type FSErrorType =