Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

Linux API??

I know this is a stupid question but is there a Linux API? In win32 you can copy a file or create a directory using its API.  Can you do the same thing using a linux API?
0
snifong
Asked:
snifong
  • 6
  • 2
  • 2
1 Solution
 
jlevieCommented:
Well yeah, there's the Posix API, the generic Unix API, and some Linux specific extensions. What you use is pretty dependent on what language you are using and what you are trying to do. A generic way would be to use system() to invoke a command to create a dir or copy a file.
0
 
snifongAuthor Commented:
C / C++
0
 
rbrCommented:
As jlevie mentioned. Linux use the Posix standard (Which can be used by Windows NT too)

For creating a directory e.g. use

mkdir (pathname, mode);


In general you can use any commands by the system command but you have to take care since this command starts a new process.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
snifongAuthor Commented:
Where do I get it?
0
 
rbrCommented:
Is part of any C/C++ installation. You don't need anythink else.

If you need a C/C++ compiler check

www.gnu.org
0
 
snifongAuthor Commented:
Standard in MS VC++ ?
0
 
snifongAuthor Commented:
Adjusted points from 25 to 30
0
 
snifongAuthor Commented:
Oops. Sorry. Ignore the last comment.  What about documentation?  Where can I find it.
0
 
jlevieCommented:
The basic platform independent stuff is covered in any of the standard texts on C or C++. I particularly like "The C Programming Language" by Kernighan & Ritchie. The full sematics of all of the functions availble are also in the relevant man pages The sections your are probably most interested in are sections 2 & 3. Each man section has an intro page that describes its contents, Try "man 3 intro" to get a feel for it.
0
 
snifongAuthor Commented:
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now