filemanager/src/inc/fmutils.h
changeset 30 6e96d2143d46
parent 18 edd66bde63a4
child 35 060d0b1ab845
equal deleted inserted replaced
29:b3155376f2b4 30:6e96d2143d46
    92     static int unlockDrive( const QString &driverName, const QString &Pwd );
    92     static int unlockDrive( const QString &driverName, const QString &Pwd );
    93     static int checkDrivePwd( const QString &driverName, const QString &pwd);
    93     static int checkDrivePwd( const QString &driverName, const QString &pwd);
    94     static int setDrivePwd( const QString &driverName, const QString &oldPwd, const QString &newPwd);
    94     static int setDrivePwd( const QString &driverName, const QString &oldPwd, const QString &newPwd);
    95     static void emptyPwd( QString &pwd );
    95     static void emptyPwd( QString &pwd );
    96     static int renameDrive( const QString &driverName, const QString &newVolumeName);
    96     static int renameDrive( const QString &driverName, const QString &newVolumeName);
    97     static void ejectDrive( const QString &driverName );
    97     static int ejectDrive( const QString &driverName );
    98     static QString getFileType( const QString &filePath  );
    98     static QString getFileType( const QString &filePath  );
    99     static quint64 getDriveDetailsResult( const QString &folderPath, const QString &extension );
    99     static quint64 getDriveDetailsResult( const QString &folderPath, const QString &extension );
   100     static bool isDriveC( const QString &driverName );
   100     static bool isDriveC( const QString &driverName );
   101     static bool isDrive( const QString &path );
   101     static bool isDrive( const QString &path );
   102 	static void createDefaultFolders( const QString &driverName );
   102 	static void createDefaultFolders( const QString &driverName );
   103     static QString fillPathWithSplash( const QString &filePath );
   103     static QString fillPathWithSplash( const QString &filePath );
   104     static QString removePathSplash( const QString &filePath );
   104     static QString removePathSplash( const QString &filePath );
   105     static QString formatPath( const QString &path  );
   105     static QString formatPath( const QString &path  );
   106     static bool checkDriveFilter( const QString &driveName );
   106     static bool checkDriveAccessFilter( const QString &driveName );
   107     static QString checkDriveToFolderFilter( const QString &path );
   107     static QString checkDriveToFolderFilter( const QString &path );
   108     static QString checkFolderToDriveFilter( const QString &path );
   108     static QString checkFolderToDriveFilter( const QString &path );
   109     static bool isPathAccessabel( const QString &path );
   109     static int isPathAccessabel( const QString &path );
   110     static bool isDriveAvailable( const QString &path );
   110     static bool isDriveAvailable( const QString &path );
   111     static bool isPathEqual( const QString &pathFst, const QString &pathLast );
   111     static bool isPathEqual( const QString &pathFst, const QString &pathLast );
   112 
   112 
   113     /// fill driveList of drives can be shown in driveListView
   113     /// fill driveList of drives can be shown in driveListView
   114     static void getDriveList( QStringList &driveList, bool isHideUnAvailableDrive );
   114     static void getDriveList( QStringList &driveList, bool isHideUnAvailableDrive );
   121     static QString Localize( const QString &path );
   121     static QString Localize( const QString &path );
   122     
   122     
   123     static int getMaxFileNameLength();
   123     static int getMaxFileNameLength();
   124     static bool checkMaxPathLength( const QString& path );
   124     static bool checkMaxPathLength( const QString& path );
   125     static bool checkFolderFileName( const QString& name );
   125     static bool checkFolderFileName( const QString& name );
       
   126     
       
   127     /**
       
   128      * check file or folder path is illegal or not.
       
   129      *
       
   130      * @param  path file/folder path.
       
   131      * @param  errString if return false, errString will be set for error note.
       
   132      * @return true for not illegal and false for illegal path.
       
   133      */
       
   134     static bool checkNewFolderOrFile( const QString &path, QString &errString );
   126 
   135 
   127 };
   136 };
   128 
   137 
   129 #endif
   138 #endif
   130 
   139