plptools
Loading...
Searching...
No Matches
rfsv_api.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 *
19 */
20#ifndef _rfsv_api_h_
21#define _rfsv_api_h_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "plpfuse.h"
28
29extern int psierr_to_errno(long psierr);
30extern int rfsv_dir(const char *name, dentry **e);
31extern int rfsv_mkdir(const char *name);
32extern int rfsv_rmdir(const char *name);
33extern int rfsv_remove(const char *name);
34extern int rfsv_rename(const char *oldname, const char *newname);
35extern int rfsv_open(const char *name, long mode, uint32_t *handle);
36extern int rfsv_fclose(long handle);
37extern int rfsv_fcreate(long attr, const char *name, uint32_t *handle);
38extern int rfsv_read(char *buf, long offset, long len, const char *name);
39extern int rfsv_write(const char *buf, long offset, long len, const char *name);
40extern int rfsv_getattr(const char *name, long *attr, long *size, long *time);
41extern int rfsv_setattr(const char *name, long sattr, long dattr);
42extern int rfsv_setsize(const char *name, long size);
43extern int rfsv_setmtime(const char *name, long time);
44extern int rfsv_drivelist(int *cnt, device **devlist);
45extern int rfsv_dircount(const char *name, long *count);
46extern int rfsv_isalive(void);
47
48/* File attributes, C-style */
49#define PSI_A_RDONLY 0x0001
50#define PSI_A_HIDDEN 0x0002
51#define PSI_A_SYSTEM 0x0004
52#define PSI_A_DIR 0x0008
53#define PSI_A_ARCHIVE 0x0010
54#define PSI_A_VOLUME 0x0020
55#define PSI_A_NORMAL 0x0040
56#define PSI_A_TEMP 0x0080
57#define PSI_A_COMPRESSED 0x0100
58#define PSI_A_READ 0x0200
59#define PSI_A_EXEC 0x0400
60#define PSI_A_STREAM 0x0800
61#define PSI_A_TEXT 0x1000
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif
int psierr_to_errno(long psierr)
int rfsv_rmdir(const char *name)
Definition: main.cc:180
int rfsv_open(const char *name, long mode, uint32_t *handle)
Definition: main.cc:215
int rfsv_getattr(const char *name, long *attr, long *size, long *time)
Definition: main.cc:285
int rfsv_dircount(const char *name, long *count)
int rfsv_mkdir(const char *name)
Definition: main.cc:186
int rfsv_fcreate(long attr, const char *name, uint32_t *handle)
Definition: main.cc:204
int rfsv_dir(const char *name, dentry **e)
Definition: main.cc:150
int rfsv_setmtime(const char *name, long time)
Definition: main.cc:259
int rfsv_drivelist(int *cnt, device **devlist)
Definition: main.cc:304
int rfsv_write(const char *buf, long offset, long len, const char *name)
Definition: main.cc:244
int rfsv_setattr(const char *name, long sattr, long dattr)
Definition: main.cc:279
int rfsv_fclose(long handle)
Definition: main.cc:198
int rfsv_rename(const char *oldname, const char *newname)
Definition: main.cc:298
int rfsv_isalive(void)
Definition: main.cc:142
int rfsv_setsize(const char *name, long size)
Definition: main.cc:265
int rfsv_remove(const char *name)
Definition: main.cc:192
int rfsv_read(char *buf, long offset, long len, const char *name)
Definition: main.cc:229
Description of a Psion-Device.
Definition: plpfuse.h:34