root/WizardsToolkit/trunk/wizard/file.h

Revision 1, 1.8 KB (checked in by cristy, 3 months ago)


Line 
1/*
2  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4
5  You may not use this file except in compliance with the License.
6  obtain a copy of the License at
7
8    http://www.wizards-toolkit.org/script/license.php
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15
16  Wizard's Toolkit file methods.
17*/
18#ifndef _WIZARDSTOOLKIT_FILE_H_
19#define _WIZARDSTOOLKIT_FILE_H_
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include "wizard/exception.h"
26
27typedef enum
28{
29  ReadFileMode,
30  WriteFileMode,
31} FileMode;
32
33typedef struct _FileInfo
34  FileInfo;
35
36extern WizardExport const char
37  *GetFilePath(const FileInfo *);
38
39extern WizardExport const struct stat
40  *GetFileProperties(const FileInfo *);
41
42extern WizardExport FileInfo
43  *AcquireFileInfo(const char *,const char *,const FileMode mode,
44    ExceptionInfo *),
45  *DestroyFileInfo(FileInfo *,ExceptionInfo *);
46
47extern WizardExport int
48  GetFileDescriptor(const FileInfo *),
49  ReadFileByte(FileInfo *);
50
51extern WizardExport WizardBooleanType
52  DestroyFile(FileInfo *,ExceptionInfo *),
53  ReadFile16Bits(FileInfo *,unsigned short *),
54  ReadFile32Bits(FileInfo *,unsigned long *),
55  ReadFile64Bits(FileInfo *,WizardSizeType *),
56  ReadFileChunk(FileInfo *,void *,const size_t),
57  WriteFileChunk(FileInfo *,const void *,const size_t),
58  WriteFile16Bits(FileInfo *,const unsigned short),
59  WriteFile32Bits(FileInfo *,const unsigned long),
60  WriteFile64Bits(FileInfo *,const WizardSizeType);
61
62#if defined(__cplusplus) || defined(c_plusplus)
63}
64#endif
65
66#endif
Note: See TracBrowser for help on using the browser.