示例#1
0
文件: s3rmdir.c 项目: Baguage/cctools
int main(int argc, char** argv) {
	s3_initialize(&argc, argv);
	if(argc < 2) {
		fprintf(stderr, "usage: s3rmdir <bucket>\n");
		return -1;
	}

	s3_rm_bucket(argv[1], s3_userid(), s3_key());

	return 0;
}
示例#2
0
int main(int argc, char** argv) {
	s3_initialize(&argc, argv);

	if(argc < 2) {
		fprintf(stderr, "usage: s3mkdir <bucket>\n");
		return -1;
	}

	s3_mk_bucket(argv[1], AMZ_PERM_PRIVATE, s3_userid(), s3_key());

	return 0;
}
示例#3
0
文件: s3put.c 项目: malbrec2/cctools
int main(int argc, char** argv) {
	char remotename[FILENAME_MAX];

	s3_initialize(&argc, argv);
	if(argc < 3) {
		fprintf(stderr, "usage: s3put <filename> <bucket>\n");
		return -1;
	}
	sprintf(remotename, "/%s", path_basename(argv[1]));

	s3_put_file(argv[1], remotename, argv[2], AMZ_PERM_PRIVATE, s3_userid(), s3_key());

	return 0;
}
示例#4
0
文件: s3rm.c 项目: malbrec2/cctools
int main(int argc, char** argv) {
	char remotename[FILENAME_MAX];

	s3_initialize(&argc, argv);
	if(argc < 3) {
		fprintf(stderr, "usage: s3rm <bucket> <filename>\n");
		return -1;
	}
	sprintf(remotename, "/%s", path_basename(argv[2]));

	s3_rm_file(remotename, argv[1], s3_userid(), s3_key());

	return 0;
}
示例#5
0
文件: s3get.c 项目: LyonsLab/cctools
int main(int argc, char** argv) {
	char remotename[FILENAME_MAX];

	s3_initialize(&argc, argv);
	
	if(argc < 2) {
		fprintf(stderr, "usage: s3get <bucket> <filename>\n");
		return -1;
	}
	fprintf(stderr, "checking bucket %s for file %s\n", argv[1], argv[2]);

	sprintf(remotename, "/%s", path_basename(argv[2]));
	s3_get_file(argv[2], NULL, remotename, argv[1], s3_userid(), s3_key());

	return 0;
}