Gjsify LogoGjsify Logo

An opaque structure representing an opened directory.

record

Hierarchy

  • Dir

Index

Constructors

Properties

Methods

Constructors

Properties

name: string

Methods

  • close(): void
  • Closes the directory and deallocates all related resources.

    Returns void

  • readName(): string
  • Retrieves the name of another entry in the directory, or %NULL. The order of entries returned from this function is not defined, and may vary by file system or other operating-system dependent factors.

    %NULL may also be returned in case of errors. On Unix, you can check errno to find out if %NULL was returned because of an error.

    On Unix, the '.' and '..' entries are omitted, and the returned name is in the on-disk encoding.

    On Windows, as is true of all GLib functions which operate on filenames, the returned name is in UTF-8.

    Returns string

  • rewind(): void
  • Resets the given directory. The next call to g_dir_read_name() will return the first entry again.

    Returns void

  • makeTmp(tmpl: string): string
  • Creates a subdirectory in the preferred directory for temporary files (as returned by g_get_tmp_dir()).

    tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, as the parameter to g_mkstemp(). However, unlike these functions, the template should only be a basename, no directory components are allowed. If template is %NULL, a default template is used.

    Note that in contrast to g_mkdtemp() (and mkdtemp()) tmpl is not modified, and might thus be a read-only literal string.

    Parameters

    • tmpl: string

      Template for directory name, as in g_mkdtemp(), basename only, or %NULL for a default template

    Returns string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method