Boost C++ Libraries

PrevUpHomeNext

Class file_status

boost::filesystem::file_status — An object of type file_status stores information about the type and access permissions of a file.

Synopsis

// In header: <boost/filesystem/file_status.hpp>


class file_status {
public:

  // observers
  file_type type() const noexcept;
  perms permissions() const noexcept;

  // modifiers
  void type(file_type) noexcept;
  void permissions(perms) noexcept;
  bool operator==(file_status const &) const noexcept;
  bool operator!=(file_status const &) const noexcept;

  // public member functions
  file_status() noexcept;
  explicit file_status(file_type) noexcept;
  file_status(file_type, perms) noexcept;
  file_status(file_status const &) noexcept;
  file_status & operator=(file_status const &) noexcept;
  file_status(file_status &&) noexcept;
  file_status & operator=(file_status &&) noexcept;
};

Description

file_status observers

  1. file_type type() const noexcept;

    Returns:

    The value of type() specified by the postconditions of the most recent call to a constructor, operator=, or type(file_type) function.

  2. perms permissions() const noexcept;

    Returns:

    The value of permissions() specified by the postconditions of the most recent call to a constructor, operator=, or permissions(perms) function.

file_status modifiers

  1. void type(file_type v) noexcept;
    Sets the file type.

    Parameters:

    v

    File type to set.

    Postconditions:

    type() == v

  2. void permissions(perms prms) noexcept;
    Sets the file access permission bits.

    Parameters:

    prms

    File access permission bits to set.

    Postconditions:

    permissions() == prms

  3. bool operator==(file_status const & rhs) const noexcept;

    Returns:

    type() == rhs.type() && permissions() == rhs.permissions()

  4. bool operator!=(file_status const & rhs) const noexcept;

    Returns:

    !(*this == rhs)

file_status public member functions

  1. file_status() noexcept;
    Default constructor.

    Postconditions:

    Expression Value
    type() status_error
    permissions() perms_not_known

  2. explicit file_status(file_type v) noexcept;
    Constructor with file type.

    Parameters:

    v

    The file type.

    Postconditions:

    Expression Value
    type() ft
    permissions() prms

  3. file_status(file_type v, perms prms) noexcept;
    Constructor with file type and permissions.

    Parameters:

    v

    The file type.

    prms

    The permissions.

    Postconditions:

    Expression Value
    type() v
    permissions() prms

  4. file_status(file_status const & rhs) noexcept;
    Copy constructor.

    Effects: Copies the other file_status object.

    Parameters:

    rhs

    Object to copy from.

  5. file_status & operator=(file_status const & rhs) noexcept;
    Copy assignment operator.

    Effects: Copies the other file_status object.

    Parameters:

    rhs

    Object to copy from.

    Returns:

    *this

  6. file_status(file_status && rhs) noexcept;
    Move constructor.

    Effects: Moves from the other file_status object.

    Parameters:

    rhs

    Object to move from.

  7. file_status & operator=(file_status && rhs) noexcept;
    Move assignment operator.

    Effects: Moves from the other file_status object.

    Parameters:

    rhs

    Object to move from.

    Returns:

    *this


PrevUpHomeNext