Lua creating folders on pc?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
mplacona
Posts: 28
Joined: Tue Aug 07, 2007 7:07 am

Lua creating folders on pc?

Post by mplacona »

Hi guys, I've got a quick one here.

Can the LUA create directories on my desktop is connected by USB?

I've tried the folowing code as a test:

Code: Select all

--Connects the PSP to the USB
System.usbDiskModeActivate()

System.sleep(15000)

System.createDirectory("c:\\bkptst")
It doesn't return any error, though it doesn't create any folder.

If I try the same, but creating it on ms0:/, it woks like a charm.

Can anyone here help me?

Thanks[/code]
michaelp
Posts: 7
Joined: Mon Jul 02, 2007 2:21 am

Post by michaelp »

i don't think you can do that if it doesn't create any folder
maybe try taking 1 of the slashes in the C:/ location, i don't think there is supposed to be two
mplacona
Posts: 28
Joined: Tue Aug 07, 2007 7:07 am

Post by mplacona »

AFAIK the backslash is an escape isn't it?

If I try with just one I think I'll get an error. Will try though!
mplacona
Posts: 28
Joined: Tue Aug 07, 2007 7:07 am

Post by mplacona »

Yeah, I got no error, but no folder created either
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

No, the PSP can't control the PC in any way when it is connected as a USB mass storage device. Not a limitation of the PSP or LUA, that's just how USB mass storage works.
mplacona
Posts: 28
Joined: Tue Aug 07, 2007 7:07 am

Post by mplacona »

So that means I can't even do it using pure C?

Do you know any other way for copying files from the MS (inserted on the PSP) to the PC?

I mean.. programatically?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

In mass storage mode, the PSP can't initiate any sort of file transfer, no.
If you write a custom driver on the PSP and PC side, you could do it. Look at psplink's usb async provider stuff if you want to implement that.
Post Reply