File: pcommon.h

package info (click to toggle)
librapi2 0.9.0-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,204 kB
  • ctags: 1,258
  • sloc: sh: 9,013; ansic: 5,743; cpp: 522; makefile: 171
file content (25 lines) | stat: -rw-r--r-- 624 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef __pcommon_h__
#define __pcommon_h__

#include <synce.h>

void convert_to_backward_slashes(char* path);
bool is_remote_file(const char* filename);
WCHAR* adjust_remote_path(WCHAR* old_path, bool free_path);

struct _AnyFile;
typedef struct _AnyFile AnyFile;

typedef enum
{
	READ = 1,
	WRITE = 2
} ANYFILE_ACCESS;

AnyFile* anyfile_open(const char* filename, ANYFILE_ACCESS access);
void anyfile_close(AnyFile* file);
bool anyfile_read (AnyFile* file, unsigned char* buffer, size_t bytes, size_t* bytesAccessed);
bool anyfile_write(AnyFile* file, unsigned char* buffer, size_t bytes, size_t* bytesAccessed);

#endif