Lines Matching refs:file

6 	\file File.cpp
40 /*! If \a file is uninitialized, the newly constructed BFile will be, too.
41 \param file the BFile object to be copied
43 BFile::BFile(const BFile &file)
48 *this = file;
52 /*! \brief Creates a BFile and initializes it to the file referred to by
54 \param ref the entry_ref referring to the file
55 \param openMode the mode in which the file should be opened
67 /*! \brief Creates a BFile and initializes it to the file referred to by
69 \param entry the BEntry referring to the file
70 \param openMode the mode in which the file should be opened
82 /*! \brief Creates a BFile and initializes it to the file referred to by
84 \param path the file's path name
85 \param openMode the mode in which the file should be opened
97 /*! \brief Creates a BFile and initializes it to the file referred to by
100 \param dir the BDirectory, relative to which the file's path name is
102 \param path the file's path name relative to \a dir
103 \param openMode the mode in which the file should be opened
116 /*! If the file is properly initialized, the file's file descriptor is closed.
129 /*! \brief Re-initializes the BFile to the file referred to by the
131 \param ref the entry_ref referring to the file
132 \param openMode the mode in which the file should be opened
134 - \c B_READ_ONLY: The file is opened read only.
135 - \c B_WRITE_ONLY: The file is opened write only.
136 - \c B_READ_WRITE: The file is opened for random read/write access.
138 - \c B_CREATE_FILE: A new file will be created, if it does not already
140 - \c B_FAIL_IF_EXISTS: If the file does already exist and B_CREATE_FILE is
142 - \c B_ERASE_FILE: An already existing file is truncated to zero size.
143 - \c B_OPEN_AT_END: Seek() to the end of the file after opening.
147 - \c B_ENTRY_NOT_FOUND: File not found or failed to create file.
151 - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system.
153 - \c B_FILE_ERROR: A general file error.
154 - \c B_NO_MORE_FDS: The application has run out of file descriptors.
180 /*! \brief Re-initializes the BFile to the file referred to by the
182 \param entry the BEntry referring to the file
183 \param openMode the mode in which the file should be opened
187 - \c B_ENTRY_NOT_FOUND: File not found or failed to create file.
191 - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system.
193 - \c B_FILE_ERROR: A general file error.
194 - \c B_NO_MORE_FDS: The application has run out of file descriptors.
223 /*! \brief Re-initializes the BFile to the file referred to by the
225 \param path the file's path name
226 \param openMode the mode in which the file should be opened
230 - \c B_ENTRY_NOT_FOUND: File not found or failed to create file.
234 - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system.
236 - \c B_FILE_ERROR: A general file error.
237 - \c B_NO_MORE_FDS: The application has run out of file descriptors.
261 /*! \brief Re-initializes the BFile to the file referred to by the
264 \param dir the BDirectory, relative to which the file's path name is
266 \param path the file's path name relative to \a dir
267 \param openMode the mode in which the file should be opened
270 - \c B_ENTRY_NOT_FOUND: File not found or failed to create file.
274 - \c B_LINK_LIMIT: Indicates a cyclic loop within the file system.
276 - \c B_FILE_ERROR: A general file error.
277 - \c B_NO_MORE_FDS: The application has run out of file descriptors.
303 //! Returns whether the file is readable.
305 - \c true, if the BFile has been initialized properly and the file has
318 //! Returns whether the file is writable.
320 - \c true, if the BFile has been initialized properly and the file has
333 //! Reads a number of bytes from the file into a buffer.
334 /*! \param buffer the buffer the data from the file shall be written to
347 /*! \brief Reads a number of bytes from a certain position within the file
349 \param location the position (in bytes) within the file from which the
351 \param buffer the buffer the data from the file shall be written to
366 //! Writes a number of bytes from a buffer into the file.
367 /*! \param buffer the buffer containing the data to be written to the file
381 into the file.
382 \param location the position (in bytes) within the file at which the data
384 \param buffer the buffer containing the data to be written to the file
399 //! Seeks to another read/write position within the file.
400 /*! It is allowed to seek past the end of the file. A subsequent call to
401 Write() will pad the file with undefined data. Seeking before the
402 beginning of the file will fail and the behavior of subsequent Read()
405 to the beginning or the end of the file or the current position
407 - \c SEEK_SET: move relative to the beginning of the file
409 - \c SEEK_END: move relative to the end of the file
411 - the new read/write position relative to the beginning of the file
412 - \c B_ERROR when trying to seek before the beginning of the file
413 - \c B_FILE_ERROR, if the file is not properly initialized
424 //! Returns the current read/write position within the file.
426 - the current read/write position relative to the beginning of the file
427 - \c B_ERROR, after a Seek() before the beginning of the file
428 - \c B_FILE_ERROR, if the file has not been initialized
439 //! Sets the size of the file.
440 /*! If the file is shorter than \a size bytes it will be padded with
444 \c B_READ_ONLY mode, unless the file resides on a read only volume.
445 \param size the new file size
448 - \c B_NOT_ALLOWED, if trying to set the size of a file on a read only
475 will refer to the same file using the same mode, unless an error occurs.
476 \param file the original BFile
480 BFile::operator=(const BFile &file)
482 if (&file != this) { // no need to assign us to ourselves
484 if (file.InitCheck() == B_OK) {
485 // duplicate the file descriptor
486 int fd = _kern_dup(file.get_fd());
490 fMode = file.fMode;
510 /*! Returns the file descriptor.
512 \return the file descriptor, or -1, if not properly initialized.