Exemplo n.º 1
0
char * hb_fileLinkRead( const char * pszFileName )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->LinkRead( s_pFileTypes[ i ], pszFileName );

   return hb_fsLinkRead( pszFileName );
}
Exemplo n.º 2
0
HB_BOOL hb_fileLink( const char * pszExisting, const char * pszNewName )
{
   int i = s_fileFindDrv( pszExisting );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Link( s_pFileTypes[ i ], pszExisting, pszNewName );

   return hb_fsLink( pszExisting, pszNewName );
}
Exemplo n.º 3
0
HB_BOOL hb_fileLinkSym( const char * pszTarget, const char * pszNewName )
{
   int i = s_fileFindDrv( pszTarget );

   if( i >= 0 )
      return s_pFileTypes[ i ]->LinkSym( s_pFileTypes[ i ], pszTarget, pszNewName );

   return hb_fsLinkSym( pszTarget, pszNewName );
}
Exemplo n.º 4
0
HB_BOOL hb_fileTimeSet( const char * pszFileName, long lJulian, long lMillisec )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->TimeSet( s_pFileTypes[ i ], pszFileName, lJulian, lMillisec );

   return hb_fsSetFileTime( pszFileName, lJulian, lMillisec );
}
Exemplo n.º 5
0
HB_BOOL hb_fileAttrSet( const char * pszFileName, HB_FATTR ulAttr )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->AttrSet( s_pFileTypes[ i ], pszFileName, ulAttr );

   return hb_fsSetAttr( pszFileName, ulAttr );
}
Exemplo n.º 6
0
double hb_fileDirSpace( const char * pszDirName, HB_USHORT uiType )
{
   int i = s_fileFindDrv( pszDirName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->DirSpace( s_pFileTypes[ i ], pszDirName, uiType );

   return hb_fsDiskSpace( pszDirName, uiType );
}
Exemplo n.º 7
0
PHB_ITEM hb_fileDirectory( const char * pszDirSpec, const char * pszAttr )
{
   int i = s_fileFindDrv( pszDirSpec );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Directory( s_pFileTypes[ i ], pszDirSpec, pszAttr );

   return hb_fsDirectory( pszDirSpec, pszAttr, HB_TRUE );
}
Exemplo n.º 8
0
HB_BOOL hb_fileDirExists( const char * pszDirName )
{
   int i = s_fileFindDrv( pszDirName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->DirExists( s_pFileTypes[ i ], pszDirName );

   return hb_fsDirExists( pszDirName );
}
Exemplo n.º 9
0
HB_BOOL hb_fileDirRemove( const char * pszDirName )
{
   int i = s_fileFindDrv( pszDirName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->DirRemove( s_pFileTypes[ i ], pszDirName );

   return hb_fsRmDir( pszDirName );
}
Exemplo n.º 10
0
HB_BOOL hb_fileCopy( const char * pSrcFile, const char * pszDstFile )
{
   int i = s_fileFindDrv( pSrcFile );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Copy( s_pFileTypes[ i ], pSrcFile, pszDstFile );

   return hb_fsCopy( pSrcFile, pszDstFile );
}
Exemplo n.º 11
0
HB_BOOL hb_fileRename( const char * pszFileName, const char * pszNewName )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Rename( s_pFileTypes[ i ], pszFileName, pszNewName );

   return hb_fsRename( pszFileName, pszNewName );
}
Exemplo n.º 12
0
HB_BOOL hb_fileDelete( const char * pszFileName )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Delete( s_pFileTypes[ i ], pszFileName );

   return hb_fsDelete( pszFileName );
}
Exemplo n.º 13
0
HB_BOOL hb_fileExists( const char * pszFileName, char * pRetPath )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Exists( s_pFileTypes[ i ], pszFileName, pRetPath );

   return hb_spFileExists( pszFileName, pRetPath );
}
Exemplo n.º 14
0
PHB_FILE hb_fileExtOpen( const char * pszFileName, const char * pDefExt,
                         HB_USHORT uiExFlags, const char * pPaths,
                         PHB_ITEM pError )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
      return s_pFileTypes[ i ]->Open( s_pFileTypes[ i ], pszFileName, pDefExt, uiExFlags, pPaths, pError );

   return s_fileExtOpen( NULL, pszFileName, pDefExt, uiExFlags, pPaths, pError );
}
Exemplo n.º 15
0
HB_EXPORT HB_FOFFSET hb_fileSizeGet( const char * pszFileName, HB_BOOL bUseDirEntry )
{
   int i = s_fileFindDrv( pszFileName );

   if( i >= 0 )
   {
      HB_ERRCODE uiError;
      HB_FOFFSET nSize = 0;

      if( bUseDirEntry )
      {
         PHB_ITEM pDir = hb_fileDirectory( pszFileName, "HS" );

         uiError = hb_fsError();
         if( pDir )
         {
            PHB_ITEM pEntry = hb_arrayGetItemPtr( pDir, 1 );

            if( pEntry )
               nSize = hb_arrayGetNInt( pEntry, F_SIZE );
            hb_itemRelease( pDir );
         }
      }
      else
      {
         PHB_FILE pFile = hb_fileExtOpen( pszFileName, NULL, FO_READ | FO_COMPAT, NULL, NULL );
         if( pFile )
         {
            nSize = hb_fileSize( pFile );
            uiError = hb_fsError();
            hb_fileClose( pFile );
         }
         else
            uiError = hb_fsError();
      }
      hb_fsSetFError( uiError );

      return nSize;
   }

   return hb_fsFSize( pszFileName, bUseDirEntry );
}
Exemplo n.º 16
0
HB_BOOL hb_fileIsLocalName( const char * pszFileName )
{
   return s_fileFindDrv( pszFileName ) < 0;
}