From ecc191f590f76584a14c9c51727412b0b7b3086e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 24 May 2010 15:10:19 +0000 Subject: Changed the Bu::Stream API, setSize is now standard. There may be a few more things that should be added. A few of them still need to be implemented. I know that truncate for Bu::File is possible on windows, I've used it before, but hell if I can find it. Myriad also needs the setSize function completed. --- src/file.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/file.h') diff --git a/src/file.h b/src/file.h index 5eca3c1..b2cd2a4 100644 --- a/src/file.h +++ b/src/file.h @@ -69,6 +69,9 @@ namespace Bu WriteNew = 0x0E ///< Create a file (or truncate) for writing. /// Same as Write|Create|Truncate }; + + virtual void setSize( long iSize ); + /** * Create a temp file and return its handle. The file is opened * Read/Write. @@ -77,16 +80,9 @@ namespace Bu * characters. *@returns (Bu::File) A file object representing your temp file. */ -#ifndef WIN32 static Bu::File tempFile( Bu::FString &sName ); - /** - * Set the size of the file to (nSize). You can either grow or shrink - * the file. - *@param nSize (long) The new size of the file. - */ - void truncate( long nSize ); - +#ifndef WIN32 /** * Change the file access permissions. *@param t (mode_t) The new file access permissions. -- cgit v1.2.3