]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/fileutl.h
CDROM stuff from apt-cdrom
[apt.git] / apt-pkg / contrib / fileutl.h
index c468c95d33c0557d0794dc5ae46b62c993c93d7d..46eefc646611f8fb23c75248b3890b43f6156e3b 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: fileutl.h,v 1.6 1998/10/02 04:39:52 jgg Exp $
+// $Id: fileutl.h,v 1.10 1998/11/27 01:14:09 jgg Exp $
 /* ######################################################################
    
    File Utilities
@@ -38,10 +38,10 @@ class FileFd
    string FileName;
    
    public:
-   enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,LockEmpty};
+   enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny};
    
    bool Read(void *To,unsigned long Size);
-   bool Write(void *From,unsigned long Size);
+   bool Write(const void *From,unsigned long Size);
    bool Seek(unsigned long To);
    unsigned long Size();
    bool Close();
@@ -59,12 +59,16 @@ class FileFd
    virtual ~FileFd();
 };
 
-bool CopyFile(FileFd From,FileFd To);
+bool CopyFile(FileFd &From,FileFd &To);
 int GetLock(string File,bool Errors = true);
 bool FileExists(string File);
 string SafeGetCWD();
+void SetCloseExec(int Fd,bool Close);
+void SetNonBlock(int Fd,bool Block);
+bool WaitFd(int Fd);
 
 // File string manipulators
 string flNotDir(string File);
+string flNotFile(string File);
 
 #endif