Exemple #1
0
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;
}
Exemple #2
0
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;
}
Exemple #3
0
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;
}
Exemple #4
0
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;
}
const TCHAR* 
FilePath::GetFullPath(const TCHAR* file)
{
	FULL_PATH(ms_path, file, MAX_FILE_PATH);

	return ms_path;

}
Exemple #6
0
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;
}
Exemple #7
0
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;
}
Exemple #8
0
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;
}
Exemple #9
0
static int pifs_rename(const char *oldpath, const char *newpath)
{
  FULL_PATH(newpath);
  int ret = rename(oldpath, full_path);
  return ret == -1 ? -errno : ret;
}
Exemple #10
0
static int pifs_chmod(const char *path, mode_t mode)
{
  FULL_PATH(path);
  int ret = chmod(full_path, mode);
  return ret == -1 ? -errno : ret;
}
Exemple #11
0
static int pifs_access(const char *path, int mode)
{
  FULL_PATH(path);
  int ret = access(full_path, mode);
  return ret == -1 ? -errno : ret;
}
Exemple #12
0
static int pifs_rmdir(const char *path)
{
  FULL_PATH(path);
  int ret = rmdir(full_path);
  return ret == -1 ? -errno : ret;
}
Exemple #13
0
SDL_Texture *Cherry::tile(void) const
{
    return Graphics::instance()->texture(_hasDot ? FULL_PATH(CHERRY_TILE_NAME) : FULL_PATH(FLOOR_TILE_NAME));
}
Exemple #14
0
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;
}
Exemple #15
0
static int pifs_statfs(const char *path, struct statvfs *buf)
{
  FULL_PATH(path);
  int ret = statvfs(full_path, buf);
  return ret == -1 ? -errno : ret;
}
Exemple #16
0
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;
}
Exemple #17
0
static int pifs_utime(const char *path, struct utimbuf *times)
{
  FULL_PATH(path);
  int ret = utime(full_path, times);
  return ret == -1 ? -errno : ret;
}
Exemple #18
0
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;
}
Exemple #19
0
static int pifs_unlink(const char *path)
{
  FULL_PATH(path);
  int ret = unlink(full_path);
  return ret == -1 ? -errno : ret;
}
Exemple #20
0
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;
}
Exemple #21
0
static int pifs_symlink(const char *oldpath, const char *newpath)
{
  FULL_PATH(newpath);
  int ret = symlink(oldpath, full_path);
  return ret == -1 ? -errno : ret;
}
Exemple #22
0
static int pifs_removexattr(const char *path, const char *name)
{
  FULL_PATH(path);
  int ret = removexattr(full_path, name);
  return ret == -1 ? -errno : ret;
}