Kibotos
API 参考kibotos.ctrl.v1

FilesystemService

本页列出 kibotos.ctrl.v1 中 FilesystemService 的方法及每个方法用到的消息与枚举,由 ctrl.proto 及其注释生成,注释保持英文。多个服务共用的消息与枚举见 kibotos.ctrl.v1 类型。

node 数据面在数据面会话的 endpoint 上调用,凭证放在 Authorization: Bearer。调用方式

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

POST/kibotos.ctrl.v1.FilesystemService/Stat一元调用
请求StatRequest
  • pathstring= 1
  • userstring= 2

    user selects the identity the operation runs as: empty for the Template default, the declared account name, or root.

响应StatResponse

ListDir

POST/kibotos.ctrl.v1.FilesystemService/ListDir一元调用
请求ListDirRequest
  • pathstring= 1
  • depthuint32= 2

    depth is the maximum relative depth of returned entries; 1 lists direct children. It must be within the profile bound.

  • userstring= 3

    user selects the identity the operation runs as: empty for the Template default, the declared account name, or root.

响应ListDirResponse
  • entriesrepeatedEntryInfo= 1

    entries are sorted by path and never include the listed root itself.

MakeDir

POST/kibotos.ctrl.v1.FilesystemService/MakeDir一元调用
请求MakeDirRequest
  • pathstring= 1
  • modeuint32= 2

    mode carries permission bits only; zero selects 0755.

  • userstring= 3

    user selects the identity the operation runs as: empty for the Template default, the declared account name, or root.

响应MakeDirResponse

Move

POST/kibotos.ctrl.v1.FilesystemService/Move一元调用
请求MoveRequest
  • sourcestring= 1
  • destinationstring= 2
  • userstring= 3

    user selects the identity the operation runs as: empty for the Template default, the declared account name, or root.

响应MoveResponse

Remove

POST/kibotos.ctrl.v1.FilesystemService/Remove一元调用
请求RemoveRequest
  • pathstring= 1
  • userstring= 2

    user selects the identity the operation runs as: empty for the Template default, the declared account name, or root.

响应RemoveResponse

无字段。

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.

POST/kibotos.ctrl.v1.FilesystemService/WatchDir服务端流
请求WatchDirRequest
  • pathstring= 1

    path 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.

  • userstring= 3

    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.

响应流式WatchDirResponse

WatchDirStartedEvent

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.

  • pathstring= 1

    path is the cleaned absolute path of the entry: the requested directory joined with the entry name.

  • entry is the entry as seen when the event was handled. It is absent for REMOVE and RENAME, without include_entry, and when the entry is gone.

FilesystemEventType

  • FILESYSTEM_EVENT_TYPE_UNSPECIFIED= 0
  • FILESYSTEM_EVENT_TYPE_CREATE= 1

    CREATE: the entry was created or moved into the directory.

  • FILESYSTEM_EVENT_TYPE_WRITE= 2

    WRITE: the file content was written.

  • FILESYSTEM_EVENT_TYPE_REMOVE= 3

    REMOVE: the entry was deleted.

  • FILESYSTEM_EVENT_TYPE_RENAME= 4

    RENAME: the entry was moved away; path is where it was.

  • FILESYSTEM_EVENT_TYPE_CHMOD= 5

    CHMOD: permissions, ownership, timestamps or another attribute changed.

消息与枚举

FilesystemService 的多个方法用到以下消息与枚举。

EntryInfo

EntryInfo describes one filesystem entry without following a trailing symbolic link.

EntryType

  • ENTRY_TYPE_UNSPECIFIED= 0
  • ENTRY_TYPE_FILE= 1
  • ENTRY_TYPE_DIRECTORY= 2
  • ENTRY_TYPE_SYMLINK= 3
  • ENTRY_TYPE_OTHER= 4

本页内容