FilesystemService
本页列出 kibotos.ctrl.v1 中 FilesystemService 的方法及每个方法用到的消息与枚举,由 ctrl.proto 及其注释生成,注释保持英文。多个服务共用的消息与枚举见 kibotos.ctrl.v1 类型。
FilesystemService performs metadata operations on the Workspace filesystem: stat, listing, directory creation, move, removal, and directory watching. File content is read and written through the /v1/files HTTP endpoint on the same data-plane listener. Stat, ListDir and WatchDir require FILE_READ; the rest require FILE_WRITE. A path, here and on /v1/files, is absolute or relative to the home directory of the identity user selects; responses always name entries by their cleaned absolute path.
Stat
/kibotos.ctrl.v1.FilesystemService/Stat一元调用ListDir
/kibotos.ctrl.v1.FilesystemService/ListDir一元调用ListDirRequestListDirResponseMakeDir
/kibotos.ctrl.v1.FilesystemService/MakeDir一元调用Move
/kibotos.ctrl.v1.FilesystemService/Move一元调用MoveRequestuser selects the identity the operation runs as: empty for the Template default, the declared account name, or root.
MoveResponseRemove
/kibotos.ctrl.v1.FilesystemService/Remove一元调用WatchDir
WatchDir reports changes to the entries of one directory. It sends started once the watch is in place; from then on every change yields at least one event or the stream ends with RESOURCE_EXHAUSTED. Events only say which path may have changed: callers list the directory after started and again after the stream ends. The stream never ends with OK. The server announces it as workspace.filesystem.watch_dir.
/kibotos.ctrl.v1.FilesystemService/WatchDir服务端流WatchDirRequestpath names the directory to watch. A symbolic link to a directory is followed; event paths stay under the requested path.
include_entry attaches the affected entry to CREATE, WRITE and CHMOD events while the entry still exists.
user selects the identity the operation runs as: empty for the Template default, the declared account name, or root. The identity must be able to read the directory.
WatchDirResponseWatchDirStartedEvent
WatchDirStartedEvent is the first message of every watch stream.
此消息没有字段。
WatchDirHeartbeatEvent
此消息没有字段。
FilesystemEvent
FilesystemEvent reports that one entry of the watched directory may have changed. Changes inside subdirectories are not reported.
path is the cleaned absolute path of the entry: the requested directory joined with the entry name.
FilesystemEventType
FILESYSTEM_EVENT_TYPE_UNSPECIFIED= 0FILESYSTEM_EVENT_TYPE_CREATE= 1CREATE: the entry was created or moved into the directory.
FILESYSTEM_EVENT_TYPE_WRITE= 2WRITE: the file content was written.
FILESYSTEM_EVENT_TYPE_REMOVE= 3REMOVE: the entry was deleted.
FILESYSTEM_EVENT_TYPE_RENAME= 4RENAME: the entry was moved away; path is where it was.
FILESYSTEM_EVENT_TYPE_CHMOD= 5CHMOD: permissions, ownership, timestamps or another attribute changed.
消息与枚举
FilesystemService 的多个方法用到以下消息与枚举。
EntryInfo
EntryInfo describes one filesystem entry without following a trailing symbolic link.
path is the cleaned absolute path of the entry.
size_bytes is meaningful for regular files only and is zero otherwise.
mode carries permission bits only.
EntryType
ENTRY_TYPE_UNSPECIFIED= 0ENTRY_TYPE_FILE= 1ENTRY_TYPE_DIRECTORY= 2ENTRY_TYPE_SYMLINK= 3ENTRY_TYPE_OTHER= 4