Here is the store code C#
static void Main(string args)
String clusterAddress = "126.96.36.199?c1profile1.pea";
String fileName = "e:\\CAS\\ww.zip";//"e:\\CAS\\aa.txt"
String blobString = "5000";
int blobThreshold = Int32.Parse(blobString);
if (blobThreshold > 0)
FPLogger.ConsoleMessage("\nContent less than " + blobString + " bytes will be embedded in the CDF.");
FPLogger.ConsoleMessage("\nContent will never be embedded in the CDF.");
FPPool.EmbeddedBlobThreshold = blobThreshold;
FPPool thePool = new FPPool(clusterAddress);
// Create the clip
FPClip clipRef = new FPClip(thePool, fileName);
clipRef.RetentionExpiry = new DateTime(2015, 10, 10);
// Or you could set this using a TimeSpan
//clipRef.RetentionPeriod = new TimeSpan(500, 12, 20, 30);
FPTag fileTag = clipRef.AddTag("StoreContentObject");
// Write the content of the file to the Centera
FPStream streamRef = new FPStream(fileName, 16 * 1024);
long blobSize = fileTag.BlobSize;
if (blobThreshold > 0 && blobSize < blobThreshold)
FPLogger.ConsoleMessage("\nContent was embedded in the CDF as size "
+ " is less than the threshold.");
String clipID = clipRef.Write();
/* Write the Clip ID to the output file, "inputFileName.clipID" */
String outFileName = fileName + ".clipID";
FPLogger.ConsoleMessage("\nThe C-Clip ID of the content is " + clipID);
FileStream outFile = new FileStream(outFileName, FileMode.Create);
StreamWriter outWriter = new StreamWriter(outFile);
catch (FPLibraryException e)
ErrorInfo err = e.errorInfo;
FPLogger.ConsoleMessage("\nException thrown in FP Library: Error " + err.error + " " + err.message);
Ah, I thought you might be writing code for this but wasn't sure. How about just creating a .zip of the files in your directory and pushing that up to Centera?
To answer your question: No, there is no way to store a directory on Centera. If you examine your code closely you'll see that (despite your original post) you are not storing files on Centera, either. You are storing blobs.
Now, as to a solution, if you wish to simulate storing a directory, you could walk your directory and stream each file to a different blob in your C-Clip, one per tag. You could use the tag's attributes to store the original file name.
You could also zip them up as Mike Horgan suggested, and store the zip in a single blob.