Not sure I’m going about this the right way.
I have a form, which writes to a custom table. I can query and list the custom table, and a snippet then sends tab-formatted output as a file to the user. While I still have that output in tab-delimited form, I want to write a file to the filesystem, but I’m getting a little confused as to how to go about this.
I see that there is a modFile object, but the path appears to be set in modFileSystemResource, and I’m not really sure how/if to instantiate either - is it as simple as
$file = newObject('modFile');
If so, how do I tell it the other stuff I need to tell it (path/filename)?
[As an aside, I’ve tried going a completely different way, and creating a resource instead of a file (which I know how to do from form input), but there are three problems here - I can’t seem to set ’text’ as a content_type, it won’t preview or publish at the right location, and I eventually want the list of these created files / resources to show up in a list, and Wayfinder doesn’t seem to like text resources.]