File:  [Previous NeXT emulator] / previous / src / includes / file.h
Revision 1.1.1.4 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 19:34:18 2018 UTC (8 years, 3 months ago) by root
Branches: giles, MAIN
CVS tags: branch_softfloat, HEAD
Previous NeXT emulator

/*
  Hatari - file.h

  This file is distributed under the GNU Public License, version 2 or at
  your option any later version. Read the file gpl.txt for details.
*/

#pragma once

#ifndef HATARI_FILE_H
#define HATARI_FILE_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

void File_CleanFileName(char *pszFileName);
void File_AddSlashToEndFileName(char *pszFileName);
bool File_DoesFileExtensionMatch(const char *pszFileName, const char *pszExtension);
const char *File_RemoveFileNameDrive(const char *pszFileName);
bool File_DoesFileNameEndWithSlash(char *pszFileName);
Uint8 *File_Load(const char *pszFileName, long *pFileSize, const char * const ppszExts[]);
bool File_Save(const char *pszFileName, const Uint8 *pAddress, size_t Size, bool bQueryOverwrite);
off_t File_Length(const char *pszFileName);
bool File_Exists(const char *pszFileName);
bool File_DirExists(const char *psDirName);
bool File_QueryOverwrite(const char *pszFileName);
char* File_FindPossibleExtFileName(const char *pszFileName,const char * const ppszExts[]);
void File_SplitPath(const char *pSrcFileName, char *pDir, char *pName, char *Ext);
char* File_MakePath(const char *pDir, const char *pName, const char *pExt);
void File_ShrinkName(char *pDestFileName, const char *pSrcFileName, int maxlen);
FILE *File_Open(const char *path, const char *mode);
FILE *File_Close(FILE *fp);
bool File_Read(Uint8 *data, Uint32 size, Uint64 offset, FILE *fp);
bool File_Write(Uint8 *data, Uint32 size, Uint64 offset, FILE *fp);
bool File_InputAvailable(FILE *fp);
void File_MakeAbsoluteSpecialName(char *pszFileName);
void File_MakeAbsoluteName(char *pszFileName);
void File_MakeValidPathName(char *pPathName);
void File_PathShorten(char *path, int dirs);
void File_HandleDotDirs(char *path);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* HATARI_FILE_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.