Details

    • Type: Change Request
    • Status: Closed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      Linux

      Description

      Right now, it's not possible to detect the presence of a device (or anything different than a regular file in POSIX terms). There is the typical item vfs.file.exists[file] but it discards many common file modes. At the moment the return value depends on what S_ISREG POSIX macro returns.

      So it's not possible to check the presence of those types:

      • S_ISDIR If the mode is from a directory.
      • S_ISCHR If the mode is from a character special device file.
      • S_ISBLK If the mode is from a block special device file.
      • S_ISFIFO If the mode is from a FIFO (named pipe).
      • S_ISLNK If the mode is from a symbolic link.
      • S_ISSOCK If the mode is from a socket.

      This proposal adds an optional parameter mode to the item vfs.file.exists in order to check for the presence of directories, devices, unix sockets, etc.

      mode - POSIX mode (default is regular)

      mode - possible values:
      regular (default), directory, chardev, blockdev, fifo, symlink, socket

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                alexandre.fournier Alexandre Fournier
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: