summaryrefslogtreecommitdiff
path: root/src/os/unix.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove config.h and make fileops an internal APIAndreas Ericsson2008-12-021-83/+0
| | | | | | | | | | | | | | Since it doesn't make sense to make the disk access stuff portable *AND* public (that's a job for each application imo), we can take a shortcut and just support unixy stuff for now and get away with coding most of it as macros. Since we go with an internal API for starters and only provide higher-level API's to the libgit users, we'll be ok with this approach. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add git_fsize to the os file APIShawn O. Pearce2008-11-031-1/+8
| | | | | | This permits us to get the size of an opened file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Redefine git_fread, git_fwrite to transfer the whole unitShawn O. Pearce2008-11-031-12/+41
| | | | | | | | | | We never want to accept a short read or a short write when transferring data to or from a local file. Either the entire read (or write) completes or the operation failed and we will not recover gracefully from it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Create a micro abstraction around the POSIX file APIsShawn O. Pearce2008-11-011-0/+47
This way we can start to write IO code to read and write files in the Git object database, but provide a hook to inject native Win32 APIs instead so libgit2 can be ported to run natively on that platform. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>