C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 2nd, 2008, 08:54 PM
mantai007 mantai007 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 290 mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 3 h 48 m 33 sec
Reputation Power: 6
Read/write lseek

Hi i was wondering if anyone knew of some examples on the Solaris specific library functions read/write lseek ?

Reply With Quote
  #2  
Old May 2nd, 2008, 09:02 PM
L7Sqr L7Sqr is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Constant Limbo
Posts: 647 L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level)L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level)L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level)L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level)L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level)L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level)L7Sqr User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 15 h 5 m 47 sec
Reputation Power: 102
Send a message via AIM to L7Sqr
__________________
-- I'll provide you with reference points; if they dont work, refer to something else.

If you process text, this might make your life a little easier.

Reply With Quote
  #3  
Old May 2nd, 2008, 09:28 PM
mantai007 mantai007 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 290 mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 3 h 48 m 33 sec
Reputation Power: 6
Funny... But not specific I have tried Google before posting...

Reply With Quote
  #4  
Old May 3rd, 2008, 03:23 AM
clifford's Avatar
clifford clifford is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2003
Location: UK
Posts: 2,656 clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level)clifford User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 8 h 20 m 29 sec
Reputation Power: 386
There are standard functions (and classes in C++) for file I/O in C and C++. These include read, write, and seek operations. What makes you think you need anything OS specific?

Furthermore operations that are not covered by the ISO standard library, such as directory manipulation, file enumeration, and low-level I/O dealing with file permissions etc. are standardised by the POSIX standard, and will therefore be supported by Solaris. Solaris is a Unix implementation, anything you find referring to Unix, POSIX, or even Linux will generally apply to your Solaris environment.

That is why you got a 'non-specific' answer - the answer is generally applicable - most of those POSIX calls (or at least near identical versions), are even available on non-POSIX OS's such as Windows.

The POSIX file I/O is described on the Sun Developer Network site (perhaps where you should have looked!), here:http://developers.sun.com/solaris/articles/fileio.html


The standard C I/O is described here (for example):http://www.cplusplus.com/reference/clibrary/cstdio/

And for C++: http://www.cplusplus.com/reference/iostream/

For portability, unless you really need low level control of file permissions or other filesystem features, I suggest that you stick to the ISO standard I/O operations.


Clifford

Reply With Quote
  #5  
Old May 3rd, 2008, 09:38 PM
mantai007 mantai007 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 290 mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level)mantai007 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 3 h 48 m 33 sec
Reputation Power: 6
Thanks for the answer, i was concerned about the file descriptors.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Read/write lseek


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT