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#pragma once
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include "plpfuse.h"
27
28extern int psierr_to_errno(long psierr);
29extern int rfsv_dir(const char *name, dentry **e);
30extern int rfsv_mkdir(const char *name);
31extern int rfsv_rmdir(const char *name);
32extern int rfsv_remove(const char *name);
33extern int rfsv_rename(const char *oldname, const char *newname);
34extern int rfsv_open(const char *name, long mode, uint32_t *handle);
35extern int rfsv_fclose(long handle);
36extern int rfsv_fcreate(long attr, const char *name, uint32_t *handle);
37extern int rfsv_read(char *buf, long offset, long len, const char *name);
38extern int rfsv_write(const char *buf, long offset, long len, const char *name);
39extern int rfsv_getattr(const char *name, long *attr, long *size, long *time);
40extern int rfsv_setattr(const char *name, long sattr, long dattr);
41extern int rfsv_setsize(const char *name, long size);
42extern int rfsv_setmtime(const char *name, long time);
43extern int rfsv_drivelist(int *cnt, device **devlist);
44extern int rfsv_dircount(const char *name, long *count);
45extern int rfsv_isalive(void);
46
47/* File attributes, C-style */
48#define PSI_A_RDONLY 0x0001
49#define PSI_A_HIDDEN 0x0002
50#define PSI_A_SYSTEM 0x0004
51#define PSI_A_DIR 0x0008
52#define PSI_A_ARCHIVE 0x0010
53#define PSI_A_VOLUME 0x0020
54#define PSI_A_NORMAL 0x0040
55#define PSI_A_TEMP 0x0080
56#define PSI_A_COMPRESSED 0x0100
57#define PSI_A_READ 0x0200
58#define PSI_A_EXEC 0x0400
59#define PSI_A_STREAM 0x0800
60#define PSI_A_TEXT 0x1000
61
62#ifdef __cplusplus
63}
64#endif
int psierr_to_errno(long psierr)
int rfsv_rmdir(const char *name)
Definition: main.cc:182
int rfsv_open(const char *name, long mode, uint32_t *handle)
Definition: main.cc:217
int rfsv_getattr(const char *name, long *attr, long *size, long *time)
Definition: main.cc:287
int rfsv_dircount(const char *name, long *count)
int rfsv_mkdir(const char *name)
Definition: main.cc:188
int rfsv_fcreate(long attr, const char *name, uint32_t *handle)
Definition: main.cc:206
int rfsv_dir(const char *name, dentry **e)
Definition: main.cc:152
int rfsv_setmtime(const char *name, long time)
Definition: main.cc:261
int rfsv_drivelist(int *cnt, device **devlist)
Definition: main.cc:306
int rfsv_write(const char *buf, long offset, long len, const char *name)
Definition: main.cc:246
int rfsv_setattr(const char *name, long sattr, long dattr)
Definition: main.cc:281
int rfsv_fclose(long handle)
Definition: main.cc:200
int rfsv_rename(const char *oldname, const char *newname)
Definition: main.cc:300
int rfsv_isalive(void)
Definition: main.cc:144
int rfsv_setsize(const char *name, long size)
Definition: main.cc:267
int rfsv_remove(const char *name)
Definition: main.cc:194
int rfsv_read(char *buf, long offset, long len, const char *name)
Definition: main.cc:231
Description of a Psion-Device.
Definition: plpfuse.h:33