Ejemplo n.º 1
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_opendir(const char *path, struct fuse_file_info *info)
{
  FULL_PATH(path);
  DIR *dir = opendir(full_path);
  info->fh = (uint64_t) dir;
  return !dir ? -errno : 0;
}
Ejemplo n.º 2
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_open(const char *path, struct fuse_file_info *info)
{
  FULL_PATH(path);
  int ret = open(full_path, info->flags);
  info->fh = ret;
  return ret == -1 ? -errno : 0;
}
Ejemplo n.º 3
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_getattr(const char *path, struct stat *buf)
{
  FULL_PATH(path);
  int ret = lstat(full_path, buf);
  buf->st_size /= 2;
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 4
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_getxattr(const char *path, const char *name, char *value,
                         size_t size)
{
  FULL_PATH(path);
  int ret = getxattr(full_path, name, value, size);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 5
0
const TCHAR* 
FilePath::GetFullPath(const TCHAR* file)
{
	FULL_PATH(ms_path, file, MAX_FILE_PATH);

	return ms_path;

}
Ejemplo n.º 6
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_create(const char *path, mode_t mode,
                       struct fuse_file_info *info)
{
  FULL_PATH(path);
  int ret = creat(full_path, mode);
  info->fh = ret;
  return ret == -1 ? -errno : 0;
}
Ejemplo n.º 7
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_readlink(const char *path, char *buf, size_t bufsiz)
{
  FULL_PATH(path);
  int ret = readlink(full_path, buf, bufsiz - 1);
  if (ret == -1) {
    return -errno;
  }

  buf[ret] = '\0';
  return 0;
}
Ejemplo n.º 8
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_mknod(const char *path, mode_t mode, dev_t dev)
{
  FULL_PATH(path);
  int ret = mknod(full_path, mode, dev);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 9
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_rename(const char *oldpath, const char *newpath)
{
  FULL_PATH(newpath);
  int ret = rename(oldpath, full_path);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 10
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_chmod(const char *path, mode_t mode)
{
  FULL_PATH(path);
  int ret = chmod(full_path, mode);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 11
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_access(const char *path, int mode)
{
  FULL_PATH(path);
  int ret = access(full_path, mode);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 12
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_rmdir(const char *path)
{
  FULL_PATH(path);
  int ret = rmdir(full_path);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 13
0
SDL_Texture *Cherry::tile(void) const
{
    return Graphics::instance()->texture(_hasDot ? FULL_PATH(CHERRY_TILE_NAME) : FULL_PATH(FLOOR_TILE_NAME));
}
Ejemplo n.º 14
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_mkdir(const char *path, mode_t mode)
{
  FULL_PATH(path);
  int ret = mkdir(full_path, mode | S_IFDIR);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 15
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_statfs(const char *path, struct statvfs *buf)
{
  FULL_PATH(path);
  int ret = statvfs(full_path, buf);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 16
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_chown(const char *path, uid_t owner, gid_t group)
{
  FULL_PATH(path);
  int ret = chown(full_path, owner, group);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 17
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_utime(const char *path, struct utimbuf *times)
{
  FULL_PATH(path);
  int ret = utime(full_path, times);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 18
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_truncate(const char *path, off_t length)
{
  FULL_PATH(path);
  int ret = truncate(full_path, length * 2);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 19
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_unlink(const char *path)
{
  FULL_PATH(path);
  int ret = unlink(full_path);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 20
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_listxattr(const char *path, char *list, size_t size)
{
  FULL_PATH(path);
  int ret = listxattr(full_path, list, size);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 21
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_symlink(const char *oldpath, const char *newpath)
{
  FULL_PATH(newpath);
  int ret = symlink(oldpath, full_path);
  return ret == -1 ? -errno : ret;
}
Ejemplo n.º 22
0
Archivo: πfs.c Proyecto: 47d5b/pifs
static int pifs_removexattr(const char *path, const char *name)
{
  FULL_PATH(path);
  int ret = removexattr(full_path, name);
  return ret == -1 ? -errno : ret;
}