GoogleCloudPlatform / GoogleCloudPlatform/gsutil

gsutil work with explicit directories

Open
#388 20 comments 7 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

[`gcsfuse` requires explicit directories](https://cloud.google.com/storage/docs/gcs-fuse) by default. So the bucket has object:

```
dir/
dir/a.txt
```

When do `gsutils cp, mv, rsync` and I need to copy/move the explicit directory too. Reason: gsutil is faster then `gcsfuse` and the `gcsfuse` cannot `mv` (rename) directories. So when I do `gsutil mv gs://bucket/dir gs://bucket/newdir`, I got the objects:

```
dir/
newdir/a.txt
```

but I would expect

```
newdir/
newdir/a.txt
```

Similarly with `gsutils cp, rsync` - the `newdir/` explicit directory is not created.

_Note:_ as a workaround I have created a shell script to create explicit dirs [`gsmkdirs.sh`](https://gist.github.com/xmedeko/afe62d3a9334730b87bf20833fe12617).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.