Pyro higlevel API
Classes | Public Member Functions | List of all members
os::TempFile Class Reference
Inheritance diagram for os::TempFile:
os::File os::SeekableIO os::FSNode os::StreamableIO

Classes

class  Private
 

Public Member Functions

 TempFile (const String &cPrefix="", const String &cPath="", int nAccess=S_IRUSR|S_IWUSR)
 
 ~TempFile ()
 
void Detatch ()
 
status_t Unlink ()
 
String GetPath () const
 
- Public Member Functions inherited from os::File
 File ()
 Default constructor. More...
 
 File (const String &cPath, int nOpenMode=O_RDONLY)
 Construct a file from a regular path. More...
 
 File (const Directory &cDir, const String &cName, int nOpenMode=O_RDONLY)
 Open a file addressed as a name inside a specified directory. More...
 
 File (const FileReference &cRef, int nOpenMode=O_RDONLY)
 Open a file referred to by a os::FileReference. More...
 
 File (const FSNode &cNode)
 Construct a file from a FSNode. More...
 
 File (int nFD)
 Construct a file object from a open filedescriptor. More...
 
 File (const File &cFile)
 Copy constructor. More...
 
virtual ~File ()
 
virtual status_t FDChanged (int nNewFD, const struct stat &sStat)
 
virtual off_t GetSize (bool bUpdateCache=true) const
 
virtual ssize_t Read (void *pBuffer, ssize_t nSize)
 
virtual ssize_t Write (const void *pBuffer, ssize_t nSize)
 
virtual ssize_t ReadPos (off_t nPos, void *pBuffer, ssize_t nSize)
 
virtual ssize_t WritePos (off_t nPos, const void *pBuffer, ssize_t nSize)
 
virtual off_t Seek (off_t nPos, int nMode)
 Move the file pointer. More...
 
status_t SetBufferSize (int nSize)
 Set the size of the files caching buffer. More...
 
int GetBufferSize () const
 Obtain the files buffer size. More...
 
status_t Flush ()
 Write unwritten data to the underlying file. More...
 
- Public Member Functions inherited from os::SeekableIO
virtual ~SeekableIO ()
 
- Public Member Functions inherited from os::StreamableIO
virtual ~StreamableIO ()
 
- Public Member Functions inherited from os::FSNode
 FSNode ()
 Default contructor. More...
 
 FSNode (const String &cPath, int nOpenMode=O_RDONLY)
 Construct a FSNode from a file path. More...
 
 FSNode (const Directory &cDir, const String &cName, int nOpenMode=O_RDONLY)
 Construct a FSNode from directory and a name inside that directory. More...
 
 FSNode (const FileReference &cRef, int nOpenMode=O_RDONLY)
 Construct a FSNode from a file reference. More...
 
 FSNode (int nFD)
 Construct a FSNode from a file descriptor. More...
 
 FSNode (const FSNode &cNode)
 Copy contructor. More...
 
virtual ~FSNode ()
 Destructor. More...
 
virtual status_t SetTo (const String &cPath, int nOpenMode=O_RDONLY)
 Open a node using a path. More...
 
virtual status_t SetTo (const Directory &cDir, const String &cPath, int nOpenMode=O_RDONLY)
 Open a node using a dir/path pair. More...
 
virtual status_t SetTo (const FileReference &cRef, int nOpenMode=O_RDONLY)
 Open the node referred to by the given os::FileReference. More...
 
virtual status_t SetTo (int nFD)
 Make the FSNode represent an already open file. More...
 
virtual status_t SetTo (const FSNode &cNode)
 Copy another FSNode. More...
 
virtual void Unset ()
 Reset the FSNode. More...
 
virtual bool IsValid () const
 Check if the node has been properly initialized. More...
 
virtual status_t GetStat (struct stat *psStat, bool bUpdateCache=true) const
 
virtual ino_t GetInode () const
 
virtual dev_t GetDev () const
 
virtual int GetMode (bool bUpdateCache=false) const
 
virtual time_t GetCTime (bool bUpdateCache=true) const
 
virtual time_t GetMTime (bool bUpdateCache=true) const
 
virtual time_t GetATime (bool bUpdateCache=true) const
 
bool IsDir () const
 
bool IsLink () const
 
bool IsFile () const
 
bool IsCharDev () const
 
bool IsBlockDev () const
 
bool IsFIFO () const
 
virtual status_t GetNextAttrName (String *pcName)
 Read the node's attribute directory. More...
 
virtual status_t RewindAttrdir ()
 Reset the attribute directory iterator. More...
 
virtual ssize_t WriteAttr (const String &cAttrName, int nFlags, int nType, const void *pBuffer, off_t nPos, size_t nLen)
 Add/update an attribute. More...
 
virtual ssize_t ReadAttr (const String &cAttrName, int nType, void *pBuffer, off_t nPos, size_t nLen)
 Read the data held by an attribute. More...
 
virtual status_t RemoveAttr (const String &cName)
 Remove an attribute from an FS node. More...
 
virtual status_t StatAttr (const String &cName, struct::attr_info *psBuffer)
 Get extended info about an attribute. More...
 
virtual int GetFileDescriptor () const
 

Additional Inherited Members

- Public Types inherited from os::File
enum  { DEFAULT_BUFFER_SIZE =32768 }
 

Detailed Description

Description:
See Also
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Constructor & Destructor Documentation

TempFile::TempFile ( const String cPrefix = "",
const String cPath = "",
int  nAccess = S_IRUSR | S_IWUSR 
)
TempFile::~TempFile ( )

Member Function Documentation

void TempFile::Detatch ( )
String TempFile::GetPath ( ) const
status_t TempFile::Unlink ( )