LLVM API Documentation

llvm::sys::PathWithStatus Class Reference

Path with file status class. More...

#include <Path.h>

Inheritance diagram for llvm::sys::PathWithStatus:

Inheritance graph
[legend]
Collaboration diagram for llvm::sys::PathWithStatus:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Constructors
 PathWithStatus ()
 Default constructor.
 PathWithStatus (const PathWithStatus &that)
 Copy constructor.
 PathWithStatus (const Path &other)
 Path constructor.
 PathWithStatus (const std::string &p)
 Construct a Path from a string.
 PathWithStatus (const char *StrStart, unsigned StrLen)
 Construct a Path from a string.
PathWithStatusoperator= (const PathWithStatus &that)
 Assignment Operator.
PathWithStatusoperator= (const Path &that)
 Assignment Operator.
Methods
const FileStatusgetFileStatus (bool forceUpdate=false, std::string *Error=0) const
 Get file status.


Detailed Description

Path with file status class.

This class is identical to Path class except it allows you to obtain the file status of the Path as well. The reason for the distinction is one of efficiency. First, the file status requires additional space and the space is incorporated directly into PathWithStatus without an additional malloc. Second, obtaining status information is an expensive operation on most operating systems so we want to be careful and explicity about where we allow this operation in LLVM.

Definition at line 594 of file Path.h.


Constructor & Destructor Documentation

llvm::sys::PathWithStatus::PathWithStatus (  )  [inline]

Default constructor.

Definition at line 599 of file Path.h.

llvm::sys::PathWithStatus::PathWithStatus ( const PathWithStatus that  )  [inline]

Copy constructor.

Definition at line 602 of file Path.h.

llvm::sys::PathWithStatus::PathWithStatus ( const Path other  )  [inline]

Path constructor.

This constructor allows construction from a Path object

Definition at line 608 of file Path.h.

llvm::sys::PathWithStatus::PathWithStatus ( const std::string &  p  )  [inline, explicit]

Construct a Path from a string.

This constructor will accept a std::string as a path. No checking is done on this path to determine if it is valid. To determine validity of the path, use the isValid method.

Parameters:
p  The path to assign.

Definition at line 615 of file Path.h.

llvm::sys::PathWithStatus::PathWithStatus ( const char *  StrStart,
unsigned  StrLen 
) [inline, explicit]

Construct a Path from a string.

This constructor will accept a character range as a path. No checking is done on this path to determine if it is valid. To determine validity of the path, use the isValid method.

Parameters:
StrStart  Pointer to the first character of the path
StrLen  Length of the path.

Definition at line 623 of file Path.h.


Member Function Documentation

PathWithStatus& llvm::sys::PathWithStatus::operator= ( const PathWithStatus that  )  [inline]

Assignment Operator.

Makes a copy of that to this.

Returns:
this

Definition at line 631 of file Path.h.

References fsIsValid, and status.

PathWithStatus& llvm::sys::PathWithStatus::operator= ( const Path that  )  [inline]

Assignment Operator.

Makes a copy of that to this.

Returns:
this

Reimplemented from llvm::sys::Path.

Definition at line 641 of file Path.h.

const FileStatus* llvm::sys::PathWithStatus::getFileStatus ( bool  forceUpdate = false,
std::string *  Error = 0 
) const

Get file status.

This function returns status information about the file. The type of path (file or directory) is updated to reflect the actual contents of the file system.

Returns:
0 on failure, with Error explaining why (if non-zero)

a pointer to a FileStatus structure on success.

Parameters:
forceUpdate  Force an update from the file system
Error  Optional place to return an error msg.

Referenced by llvm::Archive::addFileBefore(), llvm::DiffFilesWithTolerance(), ExpandResponseFiles(), and llvm::ArchiveMember::replaceWith().


The documentation for this class was generated from the following file:



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.