Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  writing a file to a subfolder
« previous next »
  • Print
Pages: [1]

Author Topic: writing a file to a subfolder  (Read 1302 times)

Offline andrewroth

  • Member
  • *
  • Posts: 6
writing a file to a subfolder
« on: December 09, 2010, 10:03:26 PM »
hi all

I'm making good progress on my workout plugin, but I'm having trouble writing a new file to a subfolder.  This is in the simulator.

works:    rb->open("/file.txt", O_CREAT|O_WRONLY|O_TRUNC, 0666);

doesn't:    rb->open("/folder/file.txt", O_CREAT|O_WRONLY|O_TRUNC, 0666);

I'm running the program under the same user that owns "folder" so I don't think it's a unix file permissions thing.  There's no error or failure, just the file doesn't get created.

I also tried stuff like

rb->open(ROCKBOX_DIR "/folder/file.txt", O_CREAT|O_WRONLY|O_TRUNC, 0666);
rb->open(ROCKBOX_DIR "folder/file.txt", O_CREAT|O_WRONLY|O_TRUNC, 0666);

after doing some greps in apps/plugins to see how other plugins do it.  No go.  Any ideas?  Many thanks.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  writing a file to a subfolder
 

  • SMF 2.0.18 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.03 seconds with 17 queries.