Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
colleagues:
i am trying to have the vm get a list of files in the cache partition, once _cacheActivate is called. however, all I am getting returned is nil, if _cacheActivate is not called, the main function returns the filenames over every single file in my user partition....so there is something I must not be doing right in terms of the correct path setting in the cache or something else. if i knew, i wouldn't be asking.
fun listcat (p, q)=
if p==nil
then
q
else let p -> [h nxt] in
h::listcat nxt q;;
fun secureLoad(pack)=
let _testpak pack -> ret in
if (ret == nil) then
(
_fooS "xmlparser loading";
_load pack;
1;
)
else
(
_fooS strcat "Error in " ret;
0;
);;
fun load_dependencies(parameter) =
let "locked/lib/_mlistlib.pkg"::nil -> list_of_dependencies in
(
while (list_of_dependencies!= nil)&& (secureLoad hd list_of_dependencies) do
(
set list_of_dependencies = tl list_of_dependencies;
_fooS "dependencies loading";
);
//all dependencies have been read
if list_of_dependencies==nil then
(
_fooS "done with dependency loading";
0;
)
else
(
_fooS "error in dependency loading";
0;
);
);
0;;
// Takes a list of directories to scan. The second argument should be 'nil'.
// fun [[S r1] [S r1]] [S r1]
fun getFilesInFolder (lDir, out)=
if lDir == nil then
out
else
let _listofsubdir hd lDir -> reps in
let _listoffiles hd lDir -> files in
(
if reps != nil then set out = listcat getFilesInFolder reps nil out else nil;
set out = listcat files out;
getFilesInFolder tl lDir out
);;
fun main ()=
_cacheActivate;
_showconsole;
_fooSList getFilesInFolder "" :: nil nil;
0;;
thx for your help!
-h
Offline
As Arkeon said, when the Cache is activated, only the "public" directory (and its sub-directories) is available for your job.
Try to create a "public" directory in your Cache and copy it any files. Relaunch your code, it'll work.
However, why do you want browse the Cache directory ? The local os3d project files aren't saved at this place.
This limitation may be too much excessive ? Arkeon, Bob ? What is your opinion?
This prevents a reading from an other network application.
Offline
Thx Iri. I guess scol could create a public directory in the cache when none exists yet . I want my modded player to be able to browse through a list of downloaded .pak files for when the user does not have an Internet connection.
Last edited by hebdemnobad (17-Dec-2014 14:58:22)
Offline
fun main ()=
_showconsole;
_cacheActivate;
_fooId _createpack "toto" _getmodifypack "public/test.txt";
0;;
If no "public" directory exists, it will be created.
Offline
thx iri...i see now that the 'public' directory is located in:
C:\Users\hebdemnobad\AppData\Local\Scol Voyager\Cache
...i thought it was located in
C:\Users\hebdemnobad\AppData\Local\Scol Voyager\
Offline
By default, in C:\Users\hebdemnobad\AppData\Local\Scol Voyager\, these two directories are located :
./cache
./logs
In ./cache, a sub-directory should be created named Prefix_##########
Usually, Prefix is Scol and ####### is a part of your Scol identifiant number (see your usmress.ini in your user partition)
Offline
Well, I don't know if the 'public' limitation is excessive or not. I guess this was implemented mainly to protect the copyright of graphic data like textures and M3d files. On the other side, when you start using files' or directories' functions, you certainly are comfortable with Scol disk architecture, and so, you are able to find these files by yourself ... so ... protection or not can be discussed here ...
Offline
Yes.
The content can be read by the system files explorer, this protection is very low.
A suggestion for this project : an option could offer the share to a public availability. The project would be copied in this "public" direcotry.
Offline