-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlistcpp.cpp
More file actions
64 lines (61 loc) · 1.46 KB
/
Copy pathlistcpp.cpp
File metadata and controls
64 lines (61 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>
#include <stdio.h>
#include <string>
#include <windows.h>
#include <strsafe.h>
#include <io.h>
#include <fcntl.h>
#include <locale>
#include <fstream>
#include <vfw.h>
#include "Functions.h"
#include "PlayList.h"
using namespace std;
int main()
{
//_setmode(_fileno(stdout), _O_U16TEXT);
wcout.imbue(locale("rus_rus.866"));//äëÿ âûâîäà
wcin.imbue(locale("rus_rus.866"));//äëÿ ââîäà
WIN32_FIND_DATA winFileData;
HANDLE hFile;
string command;
string path;
while(command!="exit")
{
getline(cin, command);
if(command.find("cd")==0)
{
command=command.substr(command.find(" ")+1);
hFile= FindFirstFile(cd(command, path).c_str(),&winFileData);
}
if(command.find("ls")==0)
{
ls(winFileData, hFile);
}
if(command.find("create")==9)
{
command=command.substr(command.find(" ")+1);
command=command.substr(command.find(" ")+1);
playlist_create(command, winFileData, hFile);
}
if(command.find("folder")==13)
{
command=command.substr(command.find(" ")+1);
command=command.substr(command.find(" ")+1);
command=command.substr(command.find(" ")+1);
playlist_add_folder(command, winFileData, hFile);
}
if(command.find("file")==13)
{
command=command.substr(command.find(" ")+1);
command=command.substr(command.find(" ")+1);
command=command.substr(command.find(" ")+1);
playlist_add_file(command, winFileData, hFile);
}
if(command.find("help")==0)
{
help();
}
}
return 0;
}