Class FileInfo

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class FileInfo extends GObject

Stores information about a file system object referenced by a File.

Functionality for manipulating basic metadata for files. GFileInfo implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.

See the file attributes document for more information on how GIO handles file attributes.

To obtain a GFileInfo for a File, use File.queryInfo(String, Set, Cancellable) (or its async variant). To obtain a GFileInfo for a file input or output stream, use FileInputStream.queryInfo(String, Cancellable) or FileOutputStream.queryInfo(String, Cancellable) (or their async variants).

To change the actual attributes of a file, you should then set the attribute in the GFileInfo and call File.setAttributesFromInfo(FileInfo, Set, Cancellable) or File.setAttributesAsync(FileInfo, Set, int, Cancellable, AsyncReadyCallback) on a GFile.

However, not all attributes can be changed in the file. For instance, the actual size of a file cannot be changed via setSize(long). You may call File.querySettableAttributes(Cancellable) and File.queryWritableNamespaces(Cancellable) to discover the settable attributes of a particular file at runtime.

The direct accessors, such as getName(), are slightly more optimized than the generic attribute accessors, such as getAttributeByteString(String).This optimization will matter only if calling the API in a tight loop.

It is an error to call these accessors without specifying their required file attributes when creating the GFileInfo. Use hasAttribute(String) or listAttributes(String) to check what attributes are specified for a GFileInfo.

Gio.FileAttributeMatcher allows for searching through a GFileInfo for attributes.

  • Constructor Details

    • FileInfo

      public FileInfo(MemorySegment address)
      Create a FileInfo instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • FileInfo

      public FileInfo()
      Create a new FileInfo.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the FileInfo class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected FileInfo asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • clearStatus

      public void clearStatus()
      Clears the status information from info.
    • copyInto

      public void copyInto(FileInfo destInfo)
      First clears all of the GFileAttribute of destInfo, and then copies all of the file attributes from this FileInfo to destInfo.
      Parameters:
      destInfo - destination to copy attributes to.
    • dup

      public FileInfo dup()
      Duplicates a file info structure.
      Returns:
      a duplicate GFileInfo of other.
    • getAccessDateTime

      public @Nullable DateTime getAccessDateTime()

      Gets the access time of the current this FileInfo and returns it as a GDateTime.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_TIME_ACCESS. If G_FILE_ATTRIBUTE_TIME_ACCESS_USEC is provided, the resulting GDateTime will additionally have microsecond precision.

      If nanosecond precision is needed, G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC must be queried separately using g_file_info_get_attribute_uint32().

      Returns:
      access time, or null if unknown
      Since:
      2.70
    • getAttributeAsString

      public @Nullable String getAttributeAsString(String attribute)

      Gets the value of an attribute, formatted as a human readable string.

      This escapes things as needed to make the string valid UTF-8 and readable by humans. It’s not meant to be a machine readable or reversible escaping format.

      To format file name attributes of type Gio.FileAttributeType.BYTE_STRING for output as UTF-8, use GLib#filenameToUtf8 instead:

      const char *trash_orig_path_byte_string;
      g_autofree char *trash_orig_path_utf8 = NULL;
      
      trash_orig_path_byte_string = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH);
      trash_orig_path_utf8 = g_filename_to_utf8 (trash_orig_path_byte_string, -1, NULL, NULL, NULL);
      if (trash_orig_path_utf8 != NULL)
        g_message ("Some larger UTF-8 string with filename embedded as %s", trash_orig_path_utf8);
      
      Parameters:
      attribute - a file attribute key.
      Returns:
      a UTF-8 string associated with the given attribute, or null if the attribute wasn’t set. When you're done with the string it must be freed with g_free().
    • getAttributeBoolean

      public boolean getAttributeBoolean(String attribute)
      Gets the value of a boolean attribute. If the attribute does not contain a boolean value, false will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the boolean value contained within the attribute.
    • getAttributeByteString

      public @Nullable String getAttributeByteString(String attribute)
      Gets the value of a byte string attribute. If the attribute does not contain a byte string, null will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the attribute value as a byte string, or null otherwise.
    • getAttributeData

      public boolean getAttributeData(String attribute, @Nullable Out<FileAttributeType> type, @Nullable Out<MemorySegment> valuePp, @Nullable Out<FileAttributeStatus> status)
      Gets the attribute type, value and status for an attribute key.
      Parameters:
      attribute - a file attribute key
      type - return location for the attribute type, or null
      valuePp - return location for the attribute value, or null; the attribute value will not be null
      status - return location for the attribute status, or null
      Returns:
      true if this FileInfo has an attribute named attribute, false otherwise.
    • getAttributeFilePath

      public @Nullable String getAttributeFilePath(String attribute)

      Gets the value of a byte string attribute as a file path.

      If the attribute does not contain a byte string, NULL will be returned.

      This function is meant to be used by language bindings that have specific handling for Unix paths.

      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the attribute value as a file path, or null otherwise.
      Since:
      2.78
    • getAttributeInt32

      public int getAttributeInt32(String attribute)
      Gets a signed 32-bit integer contained within the attribute. If the attribute does not contain a signed 32-bit integer, or is invalid, 0 will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a signed 32-bit integer from the attribute.
    • getAttributeInt64

      public long getAttributeInt64(String attribute)
      Gets a signed 64-bit integer contained within the attribute. If the attribute does not contain a signed 64-bit integer, or is invalid, 0 will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a signed 64-bit integer from the attribute.
    • getAttributeObject

      public @Nullable GObject getAttributeObject(String attribute)
      Gets the value of a GObject attribute. If the attribute does not contain a GObject, null will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a GObject associated with the given attribute, or null otherwise.
    • getAttributeStatus

      public FileAttributeStatus getAttributeStatus(String attribute)
      Gets the attribute status for an attribute key.
      Parameters:
      attribute - a file attribute key
      Returns:
      a GFileAttributeStatus for the given attribute, or FileAttributeStatus.UNSET if the key is invalid.
    • getAttributeString

      public @Nullable String getAttributeString(String attribute)
      Gets the value of a string attribute. If the attribute does not contain a string, null will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the attribute value as a UTF-8 string, or null otherwise.
    • getAttributeStringv

      public @Nullable String @Nullable [] getAttributeStringv(String attribute)
      Gets the value of a stringv attribute. If the attribute does not contain a stringv, null will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the attribute value as a stringv, or null otherwise. Do not free. These returned strings are UTF-8.
      Since:
      2.22
    • getAttributeType

      public FileAttributeType getAttributeType(String attribute)
      Gets the attribute type for an attribute key.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a GFileAttributeType for the given attribute, or FileAttributeType.INVALID if the key is not set.
    • getAttributeUint32

      public int getAttributeUint32(String attribute)
      Gets an unsigned 32-bit integer contained within the attribute. If the attribute does not contain an unsigned 32-bit integer, or is invalid, 0 will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      an unsigned 32-bit integer from the attribute.
    • getAttributeUint64

      public long getAttributeUint64(String attribute)
      Gets a unsigned 64-bit integer contained within the attribute. If the attribute does not contain an unsigned 64-bit integer, or is invalid, 0 will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a unsigned 64-bit integer from the attribute.
    • getContentType

      public @Nullable String getContentType()

      Gets the file's content type.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

      Returns:
      a string containing the file's content type, or null if unknown.
    • getCreationDateTime

      public @Nullable DateTime getCreationDateTime()

      Gets the creation time of the current this FileInfo and returns it as a GDateTime.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_TIME_CREATED. If G_FILE_ATTRIBUTE_TIME_CREATED_USEC is provided, the resulting GDateTime will additionally have microsecond precision.

      If nanosecond precision is needed, G_FILE_ATTRIBUTE_TIME_CREATED_NSEC must be queried separately using g_file_info_get_attribute_uint32().

      Returns:
      creation time, or null if unknown
      Since:
      2.70
    • getDeletionDate

      public @Nullable DateTime getDeletionDate()
      Returns the GDateTime representing the deletion date of the file, as available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, null is returned.
      Returns:
      a GDateTime, or null.
      Since:
      2.36
    • getDisplayName

      public String getDisplayName()

      Gets a display name for a file. This is guaranteed to always be set.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

      Returns:
      a string containing the display name.
    • getEditName

      public String getEditName()

      Gets the edit name for a file.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.

      Returns:
      a string containing the edit name.
    • getEtag

      public @Nullable String getEtag()

      Gets the Gio.File#entity-tags for a given GFileInfo. See G_FILE_ATTRIBUTE_ETAG_VALUE.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_ETAG_VALUE.

      Returns:
      a string containing the value of the "etag:value" attribute.
    • getFileType

      public FileType getFileType()

      Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's content type, see g_file_info_get_content_type().

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_TYPE.

      Returns:
      a GFileType for the given file.
    • getIcon

      public @Nullable Icon getIcon()

      Gets the icon for a file.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_ICON.

      Returns:
      GIcon for the given info.
    • getIsBackup

      public boolean getIsBackup()

      Checks if a file is a backup file.

      The exact semantics of what constitutes a backup file are backend-specific. For local files, a file is considered a backup if its name ends with ~ and it is a regular file. This follows the POSIX convention used by text editors such as Emacs.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP.

      Returns:
      true if file is a backup file, false otherwise.
    • getIsHidden

      public boolean getIsHidden()

      Checks if a file is hidden.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

      Returns:
      true if the file is a hidden file, false otherwise.
    • getIsSymlink

      public boolean getIsSymlink()

      Checks if a file is a symlink.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

      Returns:
      true if the given this FileInfo is a symlink.
    • getModificationDateTime

      public @Nullable DateTime getModificationDateTime()

      Gets the modification time of the current this FileInfo and returns it as a GDateTime.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_TIME_MODIFIED. If G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting GDateTime will additionally have microsecond precision.

      If nanosecond precision is needed, G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC must be queried separately using g_file_info_get_attribute_uint32().

      Returns:
      modification time, or null if unknown
      Since:
      2.62
    • getModificationTime

      @Deprecated public void getModificationTime(TimeVal result)
      Deprecated.
      Use g_file_info_get_modification_date_time() instead, as GTimeVal is deprecated due to the year 2038 problem.

      Gets the modification time of the current this FileInfo and sets it in result.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_TIME_MODIFIED. If G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided it will be used too.

      Parameters:
      result - a GTimeVal.
    • getName

      public String getName()

      Gets the name for a file. This is guaranteed to always be set.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_NAME.

      Returns:
      a string containing the file name.
    • getSize

      public long getSize()

      Gets the file's size (in bytes). The size is retrieved through the value of the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute and is converted from guint64 to goffset before returning the result.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_SIZE.

      Returns:
      a goffset containing the file's size (in bytes).
    • getSortOrder

      public int getSortOrder()

      Gets the value of the sort_order attribute from the GFileInfo. See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

      Returns:
      a gint32 containing the value of the "standard::sort_order" attribute.
    • getSymbolicIcon

      public @Nullable Icon getSymbolicIcon()

      Gets the symbolic icon for a file.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.

      Returns:
      GIcon for the given info.
      Since:
      2.34
    • getSymlinkTarget

      public @Nullable String getSymlinkTarget()

      Gets the symlink target for a given GFileInfo.

      It is an error to call this if the GFileInfo does not contain G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET.

      Returns:
      a string containing the symlink target.
    • hasAttribute

      public boolean hasAttribute(String attribute)
      Checks if a file info structure has an attribute named attribute.
      Parameters:
      attribute - a file attribute key.
      Returns:
      true if this FileInfo has an attribute named attribute, false otherwise.
    • hasNamespace

      public boolean hasNamespace(String nameSpace)
      Checks if a file info structure has an attribute in the specified nameSpace.
      Parameters:
      nameSpace - a file attribute namespace.
      Returns:
      true if this FileInfo has an attribute in nameSpace, false otherwise.
      Since:
      2.22
    • listAttributes

      public @Nullable String @Nullable [] listAttributes(@Nullable String nameSpace)
      Lists the file info structure's attributes.
      Parameters:
      nameSpace - a file attribute key's namespace, or null to list all attributes.
      Returns:
      a null-terminated array of strings of all of the possible attribute types for the given nameSpace, or null on error.
    • removeAttribute

      public void removeAttribute(String attribute)
      Removes all cases of attribute from this FileInfo if it exists.
      Parameters:
      attribute - a file attribute key.
    • setAccessDateTime

      public void setAccessDateTime(DateTime atime)

      Sets the G_FILE_ATTRIBUTE_TIME_ACCESS and G_FILE_ATTRIBUTE_TIME_ACCESS_USEC attributes in the file info to the given date/time value.

      G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC will be cleared.

      Parameters:
      atime - a GDateTime.
      Since:
      2.70
    • setAttribute

      public void setAttribute(String attribute, FileAttributeType type, MemorySegment valueP)
      Sets the attribute to contain the given value, if possible. To unset the attribute, use FileAttributeType.INVALID for type.
      Parameters:
      attribute - a file attribute key.
      type - a GFileAttributeType
      valueP - pointer to the value
    • setAttributeBoolean

      public void setAttributeBoolean(String attribute, boolean attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - a boolean value.
    • setAttributeByteString

      public void setAttributeByteString(String attribute, String attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - a byte string.
    • setAttributeFilePath

      public void setAttributeFilePath(String attribute, String attrValue)

      Sets the attribute to contain the given attrValue, if possible.

      This function is meant to be used by language bindings that have specific handling for Unix paths.

      Parameters:
      attribute - a file attribute key.
      attrValue - a file path.
      Since:
      2.78
    • setAttributeInt32

      public void setAttributeInt32(String attribute, int attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - a signed 32-bit integer
    • setAttributeInt64

      public void setAttributeInt64(String attribute, long attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - attribute name to set.
      attrValue - int64 value to set attribute to.
    • setAttributeMask

      public void setAttributeMask(FileAttributeMatcher mask)
      Sets mask on this FileInfo to match specific attribute types.
      Parameters:
      mask - a GFileAttributeMatcher.
    • setAttributeObject

      public void setAttributeObject(String attribute, GObject attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - a GObject.
    • setAttributeStatus

      public boolean setAttributeStatus(String attribute, FileAttributeStatus status)

      Sets the attribute status for an attribute key. This is only needed by external code that implement g_file_set_attributes_from_info() or similar functions.

      The attribute must exist in this FileInfo for this to work. Otherwise false is returned and this FileInfo is unchanged.

      Parameters:
      attribute - a file attribute key
      status - a GFileAttributeStatus
      Returns:
      true if the status was changed, false if the key was not set.
      Since:
      2.22
    • setAttributeString

      public void setAttributeString(String attribute, String attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - a UTF-8 string.
    • setAttributeStringv

      public void setAttributeStringv(String attribute, @Nullable String @Nullable [] attrValue)

      Sets the attribute to contain the given attrValue, if possible.

      Sinze: 2.22

      Parameters:
      attribute - a file attribute key
      attrValue - a null terminated array of UTF-8 strings.
    • setAttributeUint32

      public void setAttributeUint32(String attribute, int attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - an unsigned 32-bit integer.
    • setAttributeUint64

      public void setAttributeUint64(String attribute, long attrValue)
      Sets the attribute to contain the given attrValue, if possible.
      Parameters:
      attribute - a file attribute key.
      attrValue - an unsigned 64-bit integer.
    • setContentType

      public void setContentType(String contentType)
      Sets the content type attribute for a given GFileInfo. See G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
      Parameters:
      contentType - a content type.
    • setCreationDateTime

      public void setCreationDateTime(DateTime creationTime)

      Sets the G_FILE_ATTRIBUTE_TIME_CREATED and G_FILE_ATTRIBUTE_TIME_CREATED_USEC attributes in the file info to the given date/time value.

      G_FILE_ATTRIBUTE_TIME_CREATED_NSEC will be cleared.

      Parameters:
      creationTime - a GDateTime.
      Since:
      2.70
    • setDisplayName

      public void setDisplayName(String displayName)
      Sets the display name for the current GFileInfo. See G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
      Parameters:
      displayName - a string containing a display name.
    • setEditName

      public void setEditName(String editName)
      Sets the edit name for the current file. See G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
      Parameters:
      editName - a string containing an edit name.
    • setFileType

      public void setFileType(FileType type)
      Sets the file type in a GFileInfo to type. See G_FILE_ATTRIBUTE_STANDARD_TYPE.
      Parameters:
      type - a GFileType.
    • setIcon

      public void setIcon(Icon icon)
      Sets the icon for a given GFileInfo. See G_FILE_ATTRIBUTE_STANDARD_ICON.
      Parameters:
      icon - a GIcon.
    • setIsHidden

      public void setIsHidden(boolean isHidden)
      Sets the "is_hidden" attribute in a GFileInfo according to isHidden. See G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
      Parameters:
      isHidden - a gboolean.
    • setIsSymlink

      public void setIsSymlink(boolean isSymlink)
      Sets the "is_symlink" attribute in a GFileInfo according to isSymlink. See G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
      Parameters:
      isSymlink - a gboolean.
    • setModificationDateTime

      public void setModificationDateTime(DateTime mtime)

      Sets the G_FILE_ATTRIBUTE_TIME_MODIFIED and G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the given date/time value.

      G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC will be cleared.

      Parameters:
      mtime - a GDateTime.
      Since:
      2.62
    • setModificationTime

      @Deprecated public void setModificationTime(TimeVal mtime)
      Deprecated.
      Use g_file_info_set_modification_date_time() instead, as GTimeVal is deprecated due to the year 2038 problem.

      Sets the G_FILE_ATTRIBUTE_TIME_MODIFIED and G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the given time value.

      G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC will be cleared.

      Parameters:
      mtime - a GTimeVal.
    • setName

      public void setName(String name)
      Sets the name attribute for the current GFileInfo. See G_FILE_ATTRIBUTE_STANDARD_NAME.
      Parameters:
      name - a string containing a name.
    • setSize

      public void setSize(long size)
      Sets the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info to the given size.
      Parameters:
      size - a goffset containing the file's size.
    • setSortOrder

      public void setSortOrder(int sortOrder)
      Sets the sort order attribute in the file info structure. See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
      Parameters:
      sortOrder - a sort order integer.
    • setSymbolicIcon

      public void setSymbolicIcon(Icon icon)
      Sets the symbolic icon for a given GFileInfo. See G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.
      Parameters:
      icon - a GIcon.
      Since:
      2.34
    • setSymlinkTarget

      public void setSymlinkTarget(String symlinkTarget)
      Sets the G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info to the given symlink target.
      Parameters:
      symlinkTarget - a static string containing a path to a symlink target.
    • unsetAttributeMask

      public void unsetAttributeMask()
      Unsets a mask set by g_file_info_set_attribute_mask(), if one is set.
    • builder

      public static FileInfo.Builder<? extends FileInfo.Builder> builder()
      A FileInfo.Builder object constructs a FileInfo with the specified properties. Use the various set...() methods to set properties, and finish construction with FileInfo.Builder.build().
      Returns:
      the builder object