Example #1
5
int OssFS::create(const char *path, mode_t mode, struct fuse_file_info *fi) 
{
	log_debug("path:%s", path);
	std::vector<OssStats *> stats;
	
	OssObject * obj = this->add_file(path, stats, OSS_REGULAR);
	if (NULL == obj)
	{
		return -ENOENT;
	}

    obj->set_write();
	
	return obj->fopen(fi);
}
Example #2
-32
int OssFS::open(const char *path, struct fuse_file_info *fileInfo) 
{
	log_debug("path:[%s]", path);
	OssObject *obj = this->find_certain_path(path);
	
	if (obj != NULL) {
		return obj->fopen(fileInfo);
	} else
		return -ENOENT;
}