CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUIFile.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
20#include "../UI/FxUIObject.h"
21
25
26class CFxUIFileImpl;
27class CFxUIByteArray;
28class QFile;
29
31{
32public:
34 {
35 ReadOwner = 0x4000,
36 WriteOwner = 0x2000,
37 ExeOwner = 0x1000,
38 ReadUser = 0x0400,
39 WriteUser = 0x0200,
40 ExeUser = 0x0100,
41 ReadGroup = 0x0040,
42 WriteGroup = 0x0020,
43 ExeGroup = 0x0010,
44 ReadOther = 0x0004,
45 WriteOther = 0x0002,
46 ExeOther = 0x0001
47 };
48
50 {
51 NotOpen = 0x0000,
52 ReadOnly = 0x0001,
53 WriteOnly = 0x0002,
55 Append = 0x0004,
56 Truncate = 0x0008,
57 Text = 0x0010,
58 Unbuffered = 0x0020,
59 NewOnly = 0x0040,
60 ExistingOnly = 0x0080
61 };
62
63public:
64
67
70
72 CFxUIFile( const CFxUIFile& file );
73 CFxUIFile( const QFile& file );
74
77
79 CFxUIFile& operator=( const CFxUIFile& file );
80 operator const QFile&() const;
81
85 void close();
86
92 bool exists() const;
93
101 bool open( FxUIOpenMode mode );
102
108 int permissions() const;
109
116
122 bool remove();
123
131 bool setPermissions( int permissionSpec );
132
140 int write( const CFxUIByteArray& data );
141
147 void copy( const CFxUIString& destinationFileName );
148
156 static bool exists( const CFxUIString& fileName );
157
158protected:
159 CFxUIFileImpl* m_pImpl;
160};
#define COMMONUI_API
CFxString CFxUIString
CFxUIFile(const QFile &file)
CFxUIFile & operator=(const CFxUIFile &file)
bool remove()
bool exists() const
int write(const CFxUIByteArray &data)
CFxUIFileImpl * m_pImpl
Definition FxUIFile.h:159
int permissions() const
void copy(const CFxUIString &destinationFileName)
static bool exists(const CFxUIString &fileName)
@ ReadOwner
Definition FxUIFile.h:35
@ WriteOther
Definition FxUIFile.h:45
@ ReadOther
Definition FxUIFile.h:44
@ WriteGroup
Definition FxUIFile.h:42
@ ReadGroup
Definition FxUIFile.h:41
@ WriteUser
Definition FxUIFile.h:39
@ WriteOwner
Definition FxUIFile.h:36
CFxUIByteArray readAll()
bool setPermissions(int permissionSpec)
CFxUIFile(const CFxUIString &name)
@ ReadWrite
Definition FxUIFile.h:54
@ Unbuffered
Definition FxUIFile.h:58
@ WriteOnly
Definition FxUIFile.h:53
@ ExistingOnly
Definition FxUIFile.h:60
bool open(FxUIOpenMode mode)
void close()
CFxUIFile(const CFxUIFile &file)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition gles2_ext.h:110
GLuint const GLchar * name
Definition gles2_ext.h:265