3
* Copyright (c) 2002-2011 by XMLVM.org
5
* Project Info: http://www.xmlvm.org
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms of the GNU Lesser General Public License as published by
9
* the Free Software Foundation; either version 2.1 of the License, or
10
* (at your option) any later version.
12
* This library is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15
* License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23
#ifndef __XMLVM_FILE_H__
25
#define __XMLVM_FILE_H__
37
#define HyMaxPath 1024
39
#define org_apache_harmony_luni_platform_IFileSystem_SHARED_LOCK_TYPE 1L
40
#define org_apache_harmony_luni_platform_IFileSystem_EXCLUSIVE_LOCK_TYPE 2L
41
#define org_apache_harmony_luni_platform_IFileSystem_SEEK_SET 1L
42
#define org_apache_harmony_luni_platform_IFileSystem_SEEK_CUR 2L
43
#define org_apache_harmony_luni_platform_IFileSystem_SEEK_END 4L
44
#define org_apache_harmony_luni_platform_IFileSystem_O_RDONLY 0L
45
#define org_apache_harmony_luni_platform_IFileSystem_O_WRONLY 1L
46
#define org_apache_harmony_luni_platform_IFileSystem_O_RDWR 16L
47
#define org_apache_harmony_luni_platform_IFileSystem_O_RDWRSYNC 32L
48
#define org_apache_harmony_luni_platform_IFileSystem_O_APPEND 256L
49
#define org_apache_harmony_luni_platform_IFileSystem_O_CREAT 4096L
50
#define org_apache_harmony_luni_platform_IFileSystem_O_EXCL 65536L
51
#define org_apache_harmony_luni_platform_IFileSystem_O_NOCTTY 1048576L
52
#define org_apache_harmony_luni_platform_IFileSystem_O_NONBLOCK 16777216L
53
#define org_apache_harmony_luni_platform_IFileSystem_O_TRUNC 268435456L
55
#define HyOpenRead 1 /* Values for HyFileOpen */
57
#define HyOpenCreate 4
58
#define HyOpenTruncate 8
59
#define HyOpenAppend 16
61
#define HyOpenCreateNew 64 /* Use this flag with HyOpenCreate, if this flag is specified then trying to create an existing file will fail */
62
#define HyOpenSync 128
63
#define HyIsDir 0 /* Return values for HyFileAttr */
67
void ioh_convertToPlatform (char *path);
68
IDATA hyfile_open (const char *path, I_32 flags, I_32 mode);
69
IDATA hyfile_read (IDATA fd, void *buf, IDATA nbytes);
70
I_64 hyfile_seek (IDATA inFD, I_64 offset, I_32 whence);
71
IDATA hyfile_write (IDATA fd, const void *buf, IDATA nbytes);