#include <windows.h>
#include <sys/stat.h>
#include <time.h>
#include "hyport.h"
#include "portpriv.h"
#include "hystdarg.h"
#include "portnls.h"
#include "ut_hyprt.h"
Functions | |
I_32 VMCALL | hyfile_attr (struct HyPortLibrary *portLibrary, const char *path) |
Determine whether path is a file or directory. | |
I_32 VMCALL | hyfile_close (struct HyPortLibrary *portLibrary, IDATA fd) |
Closes a file descriptor. | |
const char *VMCALL | hyfile_error_message (struct HyPortLibrary *portLibrary) |
Return an error message describing the last OS error that occurred. | |
void VMCALL | hyfile_findclose (struct HyPortLibrary *portLibrary, UDATA findhandle) |
Close the handle returned from hyfile_findfirst. | |
UDATA VMCALL | hyfile_findfirst (struct HyPortLibrary *portLibrary, const char *path, char *resultbuf) |
Find the first occurrence of a file identified by path. | |
I_32 VMCALL | hyfile_findnext (struct HyPortLibrary *portLibrary, UDATA findhandle, char *resultbuf) |
Find the next filename and path matching a given handle. | |
I_64 VMCALL | hyfile_lastmod (struct HyPortLibrary *portLibrary, const char *path) |
Return the last modification time of the file path in seconds. | |
I_64 VMCALL | hyfile_length (struct HyPortLibrary *portLibrary, const char *path) |
Answer the length in bytes of the file. | |
I_32 VMCALL | hyfile_mkdir (struct HyPortLibrary *portLibrary, const char *path) |
Create a directory. | |
I_32 VMCALL | hyfile_move (struct HyPortLibrary *portLibrary, const char *pathExist, const char *pathNew) |
Move the file pathExist to a new name pathNew. | |
IDATA VMCALL | hyfile_open (struct HyPortLibrary *portLibrary, const char *path, I_32 flags, I_32 mode) |
Convert a pathname into a file descriptor. | |
IDATA VMCALL | hyfile_read (struct HyPortLibrary *portLibrary, IDATA fd, void *buf, IDATA nbytes) |
Read bytes from a file descriptor into a user provided buffer. | |
I_64 VMCALL | hyfile_seek (struct HyPortLibrary *portLibrary, IDATA fd, I_64 offset, I_32 whence) |
Repositions the offset of the file descriptor to a given offset as per directive whence. | |
void VMCALL | hyfile_shutdown (struct HyPortLibrary *portLibrary) |
PortLibrary shutdown. | |
I_32 VMCALL | hyfile_startup (struct HyPortLibrary *portLibrary) |
PortLibrary startup. | |
I_32 VMCALL | hyfile_sync (struct HyPortLibrary *portLibrary, IDATA fd) |
Synchronize a file's state with the state on disk. | |
I_32 VMCALL | hyfile_unlink (struct HyPortLibrary *portLibrary, const char *path) |
Remove a file from the file system. | |
I_32 VMCALL | hyfile_unlinkdir (struct HyPortLibrary *portLibrary, const char *path) |
Remove the trailing directory of the path. | |
void VMCALL | hyfile_vprintf (struct HyPortLibrary *portLibrary, IDATA fd, const char *format, va_list args) |
Write to a file. | |
IDATA VMCALL | hyfile_write (struct HyPortLibrary *portLibrary, IDATA fd, void *buf, IDATA nbytes) |
Write to a file. | |
void VMCALL | hyfile_printf (struct HyPortLibrary *portLibrary, IDATA fd, const char *format,...) |
Write to a file. | |
I_32 VMCALL | hyfile_set_length (struct HyPortLibrary *portLibrary, IDATA fd, I_64 newLength) |
Set the length of a file to a specified value. |
|
Determine whether path is a file or directory.
|
|
Closes a file descriptor.
|
|
Return an error message describing the last OS error that occurred. The last error returned is not thread safe, it may not be related to the operation that failed for this thread.
|
|
Close the handle returned from hyfile_findfirst.
|
|
Find the first occurrence of a file identified by path. Answers a handle to be used in subsequent calls to hyfile_findnext and hyfile_findclose.
|
|
Find the next filename and path matching a given handle.
|
|
Return the last modification time of the file path in seconds.
|
|
Answer the length in bytes of the file.
|
|
Create a directory.
|
|
Move the file pathExist to a new name pathNew.
|
|
Convert a pathname into a file descriptor.
|
|
Write to a file. Writes formatted output to the file referenced by the file descriptor.
|
|
Read bytes from a file descriptor into a user provided buffer.
|
|
Repositions the offset of the file descriptor to a given offset as per directive whence.
|
|
Set the length of a file to a specified value.
|
|
PortLibrary shutdown. This function is called during shutdown of the portLibrary. Any resources that were created by hyfile_startup should be destroyed here.
|
|
PortLibrary startup. This function is called during startup of the portLibrary. Any resources that are required for the file operations may be created here. All resources created here should be destroyed in hyfile_shutdown.
|
|
Synchronize a file's state with the state on disk.
|
|
Remove a file from the file system.
|
|
Remove the trailing directory of the path. If the path is a symbolic link to a directory, remove the symbolic link.
|
|
Write to a file. Writes formatted output to the file referenced by the file descriptor.
|
|
Write to a file. Writes up to nbytes from the provided buffer to the file referenced by the file descriptor.
|