Is there any cross platform file IO / path util library for C? -


is there c library implements platform independent version of path operations?

some examples come mind:

  • getting absolute path relative 1 (without requiring file exist)
  • ensuring directory exists.
  • creating file if non-existent, , directory in given path missing.
  • concatenating paths.
  • getting directory part of path.
  • getting filename part of path.
  • lots more....

there of course platform specific versions of these, hardly ever same thing leading chaos trying match behaviour across platforms.

and mean c, not c++, boost doesn't count.

also if there none, there sources/examples of differences between platforms, , other useful information can used write such library?

the ever-nice glib family (part of gtk+) has some, @ least.

note of functions you're describing, such "getting absolute path relative one" assumes existence of current directory, how resolution typically done. it's not "pure" function, since relies on external state. in windows, "split file system", there 1 current directory per volume (e.g. 1 c:\, 1 a:\ if have it, , on) per process.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -