{
  "source": "file.js",
  "method": "stat",
  "input-schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "path": {
        "type": "string",
        "format": "filechooser",
        "required": true
      },
      "dontFollowSymlink": {
        "description": "When set to true, if the path is a symbolic link, then it returns information about the link itself, not the file that it refers to.",
        "type": "boolean",
        "format": "plain"
      }
    }
  },
  "output-schema": {
    "type": "object",
    "properties": {
      "exists": {
        "type": "boolean",
        "description": "Flag indicating if the file/directory exists."
      },
      "isDirectory": {
        "type": "boolean",
        "description": "Flag indicating if the given url resolves to a directory."
      },
      "isFile": {
        "type": "boolean",
        "description": "Flag indicating if the given url resolves to a file."
      },
      "isBlockDevice": {
        "type": "boolean",
        "description": "Flag indicating if the given url resolves to a block device."
      },
      "isSymbolicLink": {
        "type": "boolean",
        "description": "Flag indicating if the given url is a symbolic link. Only works if dontFollowSymlink flag is true."
      },
      "isFIFO": {
        "type": "boolean",
        "description": "Flag indicating if the given url is a FIFO/pipe."
      },
      "isSocket": {
        "type": "boolean",
        "description": "Flag indicating if the given url is a Socket."
      },
      "info": {
        "type": "object",
        "properties": {
          "size": {
            "type": "integer"
          },
          "mode": {
            "type": "integer"
          },
          "uid": {
            "type": "integer",
            "description": "user ID of the owner"
          },
          "gid": {
            "type": "integer",
            "description": "group ID of the owner"
          },
          "changeTime": {
            "type": "integer",
            "description": "Time when file status was last changed (inode data modification)."
          },
          "accessTime": {
            "type": "integer",
            "description": "Time when file data was last accessed."
          },
          "modifiedTime": {
            "type": "integer",
            "description": "Time when file data was last modified."
          },
          "createdTime": {
            "type": "integer",
            "description": "Time of file creation. Set once when the file is created. On filesystems where birthtime is not available, this field may instead hold either the changeTime or unix epoch timestamp."
          }
        }
      },
      "pathInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the file/directory without the extension."
          },
          "basename": {
            "type": "string",
            "description": "Name of the file/directory with the extension."
          },
          "dir": {
            "type": "string",
            "description": "Url of the parent directory of the given entity."
          },
          "ext": {
            "type": "string",
            "description": "Extension of the file/directory if any."
          },
          "isAbsolute": {
            "type": "boolean",
            "description": "Flag indicating whether the given path is an absolute url or not."
          }
        }
      }
    }
  },
  "meta": {
    "name": "stat",
    "description": "Get file stats"
  }
}