{"id":47681,"library":"filesystem-storage-pkgcloud","title":"filesystem-storage-pkgcloud","description":"Provides a filesystem storage provider for the pkgcloud multi-cloud storage library, based on loopback-storage-service. Version 1.2.0 is the latest stable release; development appears dormant with no recent updates on GitHub. It allows using local filesystem as a storage backend, either standalone or registered as a pkgcloud provider. Key differentiator: enables local development/testing with pkgcloud's unified API without needing real cloud credentials.","status":"maintenance","version":"1.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/Jemsoft/filesystem-storage-pkgcloud","tags":["javascript","pkgcloud","filesystem","cloud","provider"],"install":[{"cmd":"npm install filesystem-storage-pkgcloud","lang":"bash","label":"npm"},{"cmd":"yarn add filesystem-storage-pkgcloud","lang":"bash","label":"yarn"},{"cmd":"pnpm add filesystem-storage-pkgcloud","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CSV parsing dependency via loopback-storage-service","package":"csv","optional":true}],"imports":[{"note":"CommonJS module; no default export.","wrong":"const filesystem = require('filesystem-storage-pkgcloud').default;","symbol":"filesystem-storage-pkgcloud","correct":"const filesystem = require('filesystem-storage-pkgcloud');"},{"note":"ESM import may not work; use require for pkgcloud integration.","wrong":"import filesystem from 'filesystem-storage-pkgcloud'; pkgcloud.providers.filesystem.storage = filesystem;","symbol":"pkgcloud.providers.filesystem.storage","correct":"pkgcloud.providers.filesystem.storage = require('filesystem-storage-pkgcloud');"},{"note":"createClient is a static factory function, not a constructor.","wrong":"const client = new require('filesystem-storage-pkgcloud').Client({ root: '/tmp/storage' });","symbol":"createClient","correct":"const client = require('filesystem-storage-pkgcloud').createClient({ root: '/tmp/storage' });"}],"quickstart":{"code":"const fs = require('fs');\nconst path = require('path');\nconst pkgcloud = require('pkgcloud');\nconst filesystemProvider = require('filesystem-storage-pkgcloud');\n\npkgcloud.providers.filesystem = {};\npkgcloud.providers.filesystem.storage = filesystemProvider;\n\nconst client = pkgcloud.storage.createClient({\n  provider: 'filesystem',\n  root: path.join(__dirname, 'test-storage')\n});\n\n// Ensure root directory exists\nif (!fs.existsSync(client.config.root)) {\n  fs.mkdirSync(client.config.root, { recursive: true });\n}\n\n// Upload example\nconst container = 'test-container';\nconst remoteFile = 'hello.txt';\nconst localFile = path.join(__dirname, 'hello.txt');\nfs.writeFileSync(localFile, 'Hello World!');\n\nclient.upload({\n  container: container,\n  remote: remoteFile,\n  local: localFile\n}, function(err, result) {\n  if (err) return console.error(err);\n  console.log('Uploaded:', result);\n  // Cleanup\n  fs.unlinkSync(localFile);\n  fs.rmdirSync(path.join(client.config.root, container), { recursive: true });\n});\n\n// List containers\nclient.getContainers(function(err, containers) {\n  if (err) return console.error(err);\n  console.log('Containers:', containers);\n});","lang":"javascript","description":"Shows how to register the filesystem provider with pkgcloud, upload a file, and list containers."},"warnings":[{"fix":"Create the root directory manually with fs.mkdirSync({ recursive: true })","message":"The root directory must exist before client creation; client does not create it automatically.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Pass root as an absolute path string","message":"Only path-style configuration; does not support URL or environment variable based root paths.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use for local testing only; switch to real pkgcloud provider for production","message":"All file operations occur under root; there is no support for cloud provider features like region, replication, or ACLs.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.2.0':25 'allow':41 'api':66 'appear':32 'backend':48 'base':18 'cloud':15,70,75 'credenti':71 'develop':31 'development/testing':61 'differenti':58 'dormant':33 'either':49 'enabl':59 'filesystem':2,7,44,74 'filesystem-storage-pkgcloud':1 'github':39 'javascript':72 'key':57 'latest':28 'librari':17 'local':43,60 'loopback':21 'loopback-storage-servic':20 'multi':14 'multi-cloud':13 'need':68 'pkgcloud':4,12,55,63,73 'provid':5,9,56,76 'real':69 'recent':36 'regist':52 'releas':30 'servic':23 'stabl':29 'standalon':50 'storag':3,8,16,22,47 'unifi':65 'updat':37 'use':42 'version':24 'without':67","created_at":"2026-06-07T16:52:45.905181+00:00","updated_at":"2026-06-07T16:52:45.905181+00:00","problems":[{"fix":"Ensure the file exists before reading, or check for existence with client.getFile()","cause":"Attempting to read a file that does not exist in the storage root.","error":"Error: ENOENT: no such file or directory, open '/nonexistent/file.txt'"},{"fix":"Use require('filesystem-storage-pkgcloud').createClient(...) correctly.","cause":"Using require('filesystem-storage-pkgcloud').createClient directly when it is an object with createClient property.","error":"TypeError: client.createClient is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Jemsoft/filesystem-storage-pkgcloud#readme","github":"https://github.com/Jemsoft/filesystem-storage-pkgcloud","docs":null,"changelog":null,"pypi":null,"npm":"filesystem-storage-pkgcloud","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}