lib/stashify/directory/google/cloud/storage.rb in stashify-google-cloud-storage-2.0.0 vs lib/stashify/directory/google/cloud/storage.rb in stashify-google-cloud-storage-3.0.0
- old
+ new
@@ -14,20 +14,9 @@
def initialize(bucket:, path:)
@bucket = bucket
super(path: path)
end
- def write_file(file)
- @bucket.create_file(
- StringIO.new(file.contents),
- path_of(file.name),
- )
- end
-
- def delete_file(name)
- @bucket.file(path_of(name)).delete
- end
-
def files
@bucket.files.map do |gcloud_file|
find(::Regexp.last_match(1)) if gcloud_file.name =~ %r{^#{Regexp.escape(path)}/([^/]*)(/.*)?$}
end.compact
end