Access (read/write files) GCP Filestore programatically using Java

230 views
Skip to first unread message

Padmanabhan Vijendran

unread,
Jun 8, 2022, 4:36:45 PM6/8/22
to Google Cloud Filestore Discuss
Hi All,

I want to know whether we can read or write files from/to GCP FileStore from Java application.  
If yes, can you share some sample codes or something.  I tried to read the GCP FileStore JAVA API documentation, but I couldn't find any useful information from that. 

Thanks. 

contreraspinon

unread,
Jun 9, 2022, 4:48:25 PM6/9/22
to Google Cloud Filestore Discuss

Can you elaborate a bit more about where you are running your Java application? For example, in this Cloud Run guide, the NFS from the Filestore instance is mounted to the Cloud Run container, at which point you can access the File System from Java code. All the code from this guide is hosted in this repository. It includes methods to write and read files in the mounted file system. If you have issues in how to mount the file system in various environments, you can check this documentation page.

Reply all
Reply to author
Forward
0 new messages