-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
884 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "fileinfo.h" | ||
|
||
|
||
FileInfo_S parseBySftpData(QString data){ | ||
FileInfo_S info; | ||
QList<QString> array; | ||
for(auto d:data.split(" ")){ | ||
if(!d.isEmpty()){ | ||
array.append(d); | ||
} | ||
} | ||
info.permission=array[0]; | ||
info.fileNum=array[1]; | ||
QString type=array[0].at(0); | ||
if(type=="d"){ | ||
info.fileType=1; | ||
}else if(type=="-"){ | ||
info.fileType=2; | ||
}else if(type=="l"){ | ||
info.fileType=3; | ||
} | ||
info.userOrGroup=array[2]+"/"+array[3]; | ||
info.fileSize=array[4]; | ||
info.fileName=array[8]; | ||
|
||
return info; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef FILEINFO_H | ||
#define FILEINFO_H | ||
#include <QString> | ||
#include <QStringList> | ||
#include <QObjectUserData> | ||
|
||
struct FileInfo_S { | ||
|
||
QString filePath; | ||
|
||
QString fileName; | ||
|
||
QString fileSize; | ||
//1=文件夹 2=文件 | ||
int fileType; | ||
|
||
QString permission; | ||
|
||
QString userOrGroup; | ||
|
||
QString fileNum; | ||
|
||
}; | ||
Q_DECLARE_METATYPE(FileInfo_S) | ||
|
||
FileInfo_S parseBySftpData(QString data); | ||
|
||
|
||
|
||
#endif // FILEINFO_H |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.