AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

File and directory handling
 
 

I have a couple of file related changes I make on every CS release that I would like to propose for inclusion, in some manner, into the main code line.

1) I have some private_code functions that read and write to files for user specific data. It would be nice to store this within the “writePath” location but this variable is not available globally. Therefore I have a small function in os.c that returns it.

2) I run CS as a DLL hosted within an application server environment. it would be nice for the user topic and log files (and others, see above), to be partitioned in the same manner with USERPATHPREFIX as they are in CS’s server mode, but obviously the DLL is not compiled/run as a true CS server. As a quick hack I just comment out the if (server) check in GetUserPath().

3) I expose a function to CS that returns the user directory path with user’s prefix that ^import() and ^export() can use.
e.g
$$reportees_cachefile = ^cacheFilePath(reportees.txt)
^nofail(RULE ^import($$reportees_cachefile @20 keep transient))

4) The GetUsersPath() function will ensure that when USERPATHPREFIX is enabled then it will create the correct folders, but it needs to do that within “writePath” and not the current working directory.

 

 
  login or register to react