Lines Matching refs:File
5 // This file is distributed under the University of Illinois Open Source
11 #include "lldb/Host/File.h"
30 if (options & File::eOpenOptionAppend)
32 if (options & File::eOpenOptionRead)
34 if (options & File::eOpenOptionCanCreateNewOnly)
39 else if (options & File::eOpenOptionWrite)
41 if (options & File::eOpenOptionCanCreateNewOnly)
47 else if (options & File::eOpenOptionRead && options & File::eOpenOptionWrite)
49 if (options & File::eOpenOptionCanCreate)
51 if (options & File::eOpenOptionCanCreateNewOnly)
59 else if (options & File::eOpenOptionRead)
63 else if (options & File::eOpenOptionWrite)
70 int File::kInvalidDescriptor = -1;
71 FILE * File::kInvalidStream = NULL;
73 File::File(const char *path, uint32_t options, uint32_t permissions) :
82 File::File (const File &rhs) :
92 File &
93 File::operator = (const File &rhs)
100 File::~File()
107 File::GetDescriptor() const
112 // Don't open the file descriptor if we don't need to, just get it from the
122 File::SetDescriptor (int fd, bool transfer_ownership)
131 FILE *
132 File::GetStream ()
153 File::SetStream (FILE *fh, bool transfer_ownership)
162 File::Duplicate (const File &rhs)
181 error.SetErrorString ("invalid file to duplicate");
187 File::Open (const char *path, uint32_t options, uint32_t permissions)
251 File::Close ()
280 File::GetFileSpec (FileSpec &file_spec) const
294 error.SetErrorString("invalid file handle");
300 error.SetErrorString ("cannot resolve file descriptor");
313 error.SetErrorString ("File::GetFileSpec is not supported on this platform");
322 File::SeekFromStart (off_t offset, Error *error_ptr)
351 error_ptr->SetErrorString("invalid file handle");
357 File::SeekFromCurrent (off_t offset, Error *error_ptr)
386 error_ptr->SetErrorString("invalid file handle");
392 File::SeekFromEnd (off_t offset, Error *error_ptr)
421 error_ptr->SetErrorString("invalid file handle");
427 File::Flush ()
443 error.SetErrorString("invalid file handle");
450 File::Sync ()
466 error.SetErrorString("invalid file handle");
472 File::Read (void *buf, size_t &num_bytes)
509 error.SetErrorString("invalid file handle");
515 File::Write (const void *buf, size_t &num_bytes)
553 error.SetErrorString("invalid file handle");
560 File::Read (void *buf, size_t &num_bytes, off_t &offset)
586 error.SetErrorString("invalid file handle");
592 File::Read (size_t &num_bytes, off_t &offset, bool null_terminate, DataBufferSP &data_buffer_sp)
628 error.SetErrorString("file is empty");
634 error.SetErrorString("invalid file handle");
637 error.SetErrorString("invalid file handle");
645 File::Write (const void *buf, size_t &num_bytes, off_t &offset)
671 error.SetErrorString("invalid file handle");
680 File::Printf (const char *format, ...)
693 File::PrintfVarArg (const char *format, va_list args)