Logo Search packages:      
Sourcecode: djvulibre version File versions

int GURL::deletefile ( void   )  const

Deletes file or directory. Directories are not deleted unless the directory is empty. Returns a negative number if an error occurs.

Definition at line 1554 of file GURL.cpp.

References is_dir(), is_local_file_url(), and NativeFilename().

Referenced by cleardir().

  int retval = -1;
#if defined(UNIX)
      if (is_dir())
        retval = ::rmdir(NativeFilename());
        retval = ::unlink(NativeFilename());
#elif defined(WIN32)
      if (is_dir())
        retval = ::RemoveDirectoryA(NativeFilename());
        retval = ::DeleteFile(NativeFilename());
# error "Define something here for your operating system"
  return retval;

Generated by  Doxygen 1.6.0   Back to index