src/core/system-file.h
changeset 57 9385fba1589e
parent 54 f860e6f94787
child 90 d670ba9f726e
--- a/src/core/system-file.h	Tue Sep 05 15:55:04 2006 +0200
+++ b/src/core/system-file.h	Wed Sep 06 11:26:51 2006 +0200
@@ -28,12 +28,45 @@
 
 class SystemFilePrivate;
 
+/**
+ * \brief os-independent file creation and writing
+ *
+ * Create a file and write data to this file.
+ */
 class SystemFile {
 public:
+	/**
+	 * This method does not create or open any
+	 * file on disk.
+	 */
     SystemFile ();
+	/**
+	 * If a file has been opened, it is closed by
+	 * this destructor.
+	 */
     ~SystemFile ();
 
+	/**
+	 * \param filename name of file to open
+	 *
+	 * Open a file for writing. If the file does not
+	 * exist, it is created. If it exists, it is 
+	 * emptied first.
+	 */
     void open (char const *filename);
+	/**
+	 * \param buffer data to write
+	 * \param size size of data to write
+	 *
+	 * Write data in file on disk. This method cannot fail:
+	 * it will write _all_ the data to disk. This method does not
+	 * perform any data caching and forwards the data
+	 * to the OS through a direct syscall. However, 
+	 * it is not possible to rely on the data being
+	 * effectively written to disk after this method returns.
+	 * To make sure the data is written to disk, destroy 
+	 * this object.
+	 */
     void write (uint8_t *buffer, uint32_t size);
 private:
     SystemFilePrivate *m_priv;