23 #include "ocilibcpp/types.hpp"
40 connection.GetHandle()
49 connection.GetHandle()
57 AcquireTransient(pFile,parent);
83 inline bool File::Equals(
const File &other)
const
103 Environment::GetEnvironmentHandle()
144 return Equals(other);
149 return (!(*
this == other));
A connection or session with a specific database.
Object identifying the SQL data type BFILE.
ostring GetDirectory() const
Return the file directory.
bool operator!=(const File &other) const
Indicates if the current file value is not equal the given file value.
void Close()
Close the file on the server.
big_uint GetOffset() const
Returns the current R/W offset within the file.
ostring GetName() const
Return the file name.
big_uint GetLength() const
Returns the number of bytes contained in the file.
Connection GetConnection() const
Return the file parent connection.
void SetInfos(const ostring &directory, const ostring &name)
Set the directory and file name of our file object.
bool Seek(SeekMode seekMode, big_uint offset)
Move the current position within the file for read/write operations.
bool operator==(const File &other) const
Indicates if the current file value is equal the given file value.
File Clone() const
Clone the current instance to a new one performing deep copy.
Raw Read(unsigned int size)
Read a portion of a file.
bool IsOpened() const
Check if the specified file is currently opened on the server by our object.
File()
Create an empty null File instance.
bool Exists() const
Check if the given file exists on server.
void Open()
Open a file for reading on the server.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Internal usage. Interface for handling ownership and relationship of a C API handle.
Internal usage. Provide a buffer class with RAII capabilities.
struct OCI_File OCI_File
Oracle External Large objects:
OCI_SYM_PUBLIC boolean OCI_API OCI_FileAssign(OCI_File *file, OCI_File *file_src)
Assign a file to another one.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileIsOpen(OCI_File *file)
Check if the specified file is opened within the file handle.
OCI_SYM_PUBLIC OCI_Connection *OCI_API OCI_FileGetConnection(OCI_File *file)
Retrieve connection handle from the file handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileIsEqual(OCI_File *file, OCI_File *file2)
Compare two file handle for equality.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileSeek(OCI_File *file, big_uint offset, unsigned int mode)
Perform a seek operation on the OCI_File content buffer.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileExists(OCI_File *file)
Check if the given file exists on server.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_FileRead(OCI_File *file, void *buffer, unsigned int len)
Read a portion of a file into the given buffer.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileSetName(OCI_File *file, const otext *dir, const otext *name)
Set the directory and file name of FILE handle.
OCI_SYM_PUBLIC big_uint OCI_API OCI_FileGetOffset(OCI_File *file)
Return the current position in the file.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileOpen(OCI_File *file)
Open a file for reading.
OCI_SYM_PUBLIC OCI_File *OCI_API OCI_FileCreate(OCI_Connection *con, unsigned int type)
Create a file object instance.
OCI_SYM_PUBLIC const otext *OCI_API OCI_FileGetDirectory(OCI_File *file)
Return the directory of the given file.
OCI_SYM_PUBLIC const otext *OCI_API OCI_FileGetName(OCI_File *file)
Return the name of the given file.
OCI_SYM_PUBLIC boolean OCI_API OCI_FileClose(OCI_File *file)
Close a file.
OCI_SYM_PUBLIC big_uint OCI_API OCI_FileGetSize(OCI_File *file)
Return the size in bytes of a file.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
ostring MakeString(const otext *result, int size=-1)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
Raw MakeRaw(AnyPointer result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
std::basic_string< otext, std::char_traits< otext >, std::allocator< otext > > ostring
string class wrapping the OCILIB otext * type and OTEXT() macros ( see Character sets )
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
void * AnyPointer
Alias for the generic void pointer.