Kaydet (Commit) 67ad4156 authored tarafından Francois Tigeot's avatar Francois Tigeot

Remove unused methods

üst 7c2224a8
......@@ -215,9 +215,6 @@ public:
static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True );
static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry );
static ErrCode QueryDiskSpace( const String &rPath,
BigInt &rFreeBytes, BigInt &rTotalBytes );
static void SetDateTime( const String& rFileName,
const DateTime& rNewDateTime );
};
......@@ -522,12 +519,6 @@ public:
#endif // BOOTSTRP
//========================================================================
void FSysEnableSysErrorBox( sal_Bool bEnable );
//========================================================================
#if defined(DBG_UTIL)
void FSysTest();
#endif
......
......@@ -1842,73 +1842,6 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
return FSYS_ERR_OK;
}
ErrCode CreateEntry_Impl( const DirEntry &rPath, DirEntryKind eKind )
{
// versuchen, anzulegen (ausser bei FSYS_KIND_ALL)
ErrCode eErr = ERRCODE_NONE;
if ( FSYS_KIND_FILE == eKind )
{
SvFileStream aStream( rPath.GetFull(), STREAM_STD_WRITE );
aStream.WriteLine( "" );
eErr = aStream.GetError();
}
else if ( FSYS_KIND_ALL != eKind )
eErr = rPath.MakeDir() ? ERRCODE_NONE : ERRCODE_IO_UNKNOWN;
// erfolgreich?
if ( !rPath.Exists() )
eErr = ERRCODE_IO_UNKNOWN; // Doch was schiefgegangen ?
// ggf. wieder l"oschen
if ( FSYS_KIND_NONE == eKind )
rPath.Kill();
// Fehlercode zur?ckliefern
return eErr;
}
sal_Bool IsValidEntry_Impl( const DirEntry &rPath,
const String &rLongName,
DirEntryKind eKind,
sal_Bool bIsShortened,
sal_Bool bUseDelim )
{
// Parameter-Pr"uefung
DBG_ASSERT( eKind == FSYS_KIND_NONE || eKind == FSYS_KIND_ALL ||
eKind == FSYS_KIND_FILE || eKind == FSYS_KIND_DIR,
"invalid entry-kind" );
// Alle von MSDOS erreichbaren FSYS_STYLES muessen den
// MSDOS Filenamenanforderungen genuegen. Sonst wird probiert,
// ob sich eine Datei des gewuenschten Names anlegen laesst.
FSysPathStyle eStyle = DirEntry::GetPathStyle();
DirEntry aPath(rPath);
DirEntry aName(rLongName, eStyle);
if ( !aName.IsValid() || aName.Level() != 1 )
return sal_False;
aPath += aName;
if ( 1 == aPath.Level() )
return sal_False;
// Pfad-Trenner sind nicht erlaubt (bei ungek"urzten auch nicht FSYS_SHORTNAME_DELIMITER)
char cDelim = bUseDelim == 2 ? FSYS_SHORTNAME_DELIMITER : char(0);
if (
rLongName.Search(DirEntry::GetAccessDelimiter()) != STRING_NOTFOUND ||
(!bIsShortened && rLongName.Search(cDelim) != STRING_NOTFOUND)
)
{
return sal_False;
}
// MI: Abfrage nach 'CON:' etc. wird jetzt in Exists() mitgemacht
if ( aPath.Exists() )
return sal_False;
return (ERRCODE_NONE == CreateEntry_Impl( aPath, eKind ));
}
//-------------------------------------------------------------------------
#define MAX_EXT_MAX 250
#define MAX_LEN_MAX 255
#define INVALID_CHARS_DEF "\\/\"':|^<>?*"
......
......@@ -521,17 +521,4 @@ void FileStat::SetDateTime( const String& rFileName,
}
}
//=========================================================================
ErrCode FileStat::QueryDiskSpace( const String &, BigInt &, BigInt & )
{
return ERRCODE_IO_NOTSUPPORTED;
}
//=========================================================================
void FSysEnableSysErrorBox( sal_Bool )
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -872,42 +872,4 @@ const char* TempDirImpl( char *pBuf )
return pBuf;
}
//=======================================================================
ErrCode FileStat::QueryDiskSpace( const String &rPath,
BigInt &rFreeBytes, BigInt &rTotalBytes )
{
DWORD nSectorsPerCluster; /* address of sectors per cluster */
DWORD nBytesPerSector; /* address of bytes per sector */
DWORD nFreeClusters; /* address of number of free clusters */
DWORD nClusters; /* address of total number of clusters */
ByteString aVol( DirEntry(rPath).ImpGetTopPtr()->GetName(), osl_getThreadTextEncoding());
bool bOK = GetDiskFreeSpace( aVol.GetBuffer(),
&nSectorsPerCluster, &nBytesPerSector,
&nFreeClusters, &nClusters );
if ( !bOK )
return Sys2SolarError_Impl( GetLastError() );
BigInt aBytesPerCluster( BigInt(nSectorsPerCluster) *
BigInt(nBytesPerSector) );
rFreeBytes = aBytesPerCluster * BigInt(nFreeClusters);
rTotalBytes = aBytesPerCluster * BigInt(nClusters);
return 0;
}
//=========================================================================
void FSysEnableSysErrorBox( sal_Bool bEnable )
{ // Preserve other Bits!!
sal_uInt32 nErrorMode = SetErrorMode( bEnable ? 0 : SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX );
if ( bEnable )
nErrorMode &= ~(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
else
nErrorMode |= (SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
SetErrorMode( nErrorMode );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment