GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — List Bucket and List File · Issue #478 · googleapis/google-cloud-node

List Bucket and List File #478

New issue
Copy link
New issue
Copy link
Closed
Closed
List Bucket and List File#478
Copy link
Assignees
stephenplusplus
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Description

@izzusan83
izzusan83
opened on Apr 3, 2015
Issue body actions

Hi all,
sorry but There isn't documentation about that.
is possible to have a bucket list and file list?

thanks

Activity

Next
  1. izzusan83 commented on Apr 3, 2015

    @izzusan83
    izzusan83
    on Apr 3, 2015
    Author
    More actions

    ok i find the metod for to have bucket list and file list:

    // list all BUCKET
    storage.getBuckets(function(err, buckets, nextQuery) {
    
        for(var i = 0; i<buckets.length; i++ ){
        // The `metadata` property is populated for you with the metadata at the
        // time of fetching.
            console.log(buckets[i].metadata.id);
        }
    
     });
    
    // list all file
    bucket.getFiles(function(err, files, nextQuery) {
    
    
        // The `metadata` property is populated for you with the metadata at the
        // time of fetching.
    
        for(var i = 0; i<files.length; i++ ){
        // The `metadata` property is populated for you with the metadata at the
        // time of fetching.
            console.log(files[i].metadata.name);
        }
    
    
    
        // However, in cases where you are concerned the metadata could have
        // changed, use the `getMetadata` method.
       //files[0].getMetadata(function(err, metadata) {});
    });

    but now i have another question...

    is possible to create a folder in the bucket?

    thanks a lot

  2. leibale commented on Apr 4, 2015

    @leibale
    leibale
    on Apr 4, 2015
    Contributor
    More actions

    if you create file in path doesn't exist google will create the folders for you

  3. stephenplusplus
    added
    api: storageIssues related to the Cloud Storage API.
    on Apr 6, 2015
  4. stephenplusplus commented on Apr 6, 2015

    @stephenplusplus
    stephenplusplus
    on Apr 6, 2015
    Contributor
    More actions

    As far as I know, that's the only way to create a folder outside of the Developer's Console UI. I think the solution of uploading a file and having a folder created in the process is fine, but feel free to correct me if you have a use case where that's not fine.

  5. stephenplusplus
    closed this as completedon Apr 6, 2015
  6. izzusan83 commented on Apr 13, 2015

    @izzusan83
    izzusan83
    on Apr 13, 2015
    Author
    More actions

    yes, is true...

                            function(err,httpResponse,body){ 
    
                                var responseJson = JSON.parse(body);
    
                                if(responseJson.success){
    
                                    callToFunctionInModule("Start Upload in GoogleStorage", cb);
    
                                    var image = bucket.file('ddsImage.dds');
    
                                    fs.createReadStream(__dirname + '../../temp/ddsConversion/' + folderName + '/ddsImage.dds')
                                        .pipe(image.createWriteStream())
                                        .on('error', function(err) {
                                            console.log(err);
                                        })
                                        .on('complete', function() {
    
    
                                            }
    
                                            console.log('The file upload is complete.');
                                    });
                                }
                            });
    

    The folder temp doesn't exist. The first time google create the folder id doesn't exist.

    but if i need to remove the folder? I sow the method for remove file and buket but not for remove a folder,

    Thanks a lot

  7. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 7, 2020
  8. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  9. sofisl
    added a commit that references this issue on Sep 27, 2022

    chore: update bucket for cloud-rad (#478)

    1105eff
  10. sofisl
    added 4 commits that reference this issue on Oct 11, 2022

    build: add config .gitattributes (#478)

    567276a

    chore: release 2.2.5 (#478)

    09ee0f4

    build: add config .gitattributes (#478)

    33d0280

    chore: release 2.2.5 (#478)

    0cdf434
  11. sofisl
    added a commit that references this issue on Nov 9, 2022

    chore: update bucket for cloud-rad (#478)

    29223ba
  12. 18 remaining items

  13. sofisl
    added a commit that references this issue on Feb 4, 2026

    build: perform publish using Node 12 (#478)

    b2f185b
  14. GautamSharda
    added a commit that references this issue on Feb 5, 2026

    test: address typescript nit (#478)

    f62bfa8
  15. GautamSharda
    added a commit that references this issue on Feb 23, 2026

    test: address typescript nit (#478)

    d75d161
  16. sofisl
    added 2 commits that reference this issue on Feb 24, 2026

    docs: fix indexing in docstr (#478)

    4246eb8

    chores(build): do not collect sponge.xml from windows builds (#478)

    b49ba92
  17. GautamSharda
    added a commit that references this issue on Feb 26, 2026

    test: address typescript nit (#478)

    841b4d2
  18. sofisl
    added a commit that references this issue on Feb 26, 2026

    chore(build): inject yoshi automation key (#478)

    5cedabd
  19. GautamSharda
    added 3 commits that reference this issue on Mar 5, 2026

    fix: DEADLINE_EXCEEDED retry code is idempotent (#478)

    c892a4a

    fix(deps): update dependency @google-cloud/promisify to ^0.4.0 (#478)

    eeaa2a8

    update .nycrc ignore rules (#478)

    d1ff132
  20. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chores(build): do not collect sponge.xml from windows builds (googlea…

    e97e32d
  21. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    fix(deps): update dependency @google-cloud/common-grpc to v1 (#478)

    f6b4d58

    fix(deps): update dependency @google-cloud/common-grpc to v1 (#478)

    54bfa7a
  22. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    fix(deps): update dependency @google-cloud/common-grpc to v1 (#478)

    05e318a
  23. thiyaguk09
    added a commit that references this issue on May 5, 2026

    fix(deps): update dependency @google-cloud/common-grpc to v1 (googlea…

    576bb8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.