我需要在具有多个子文件夹的文件夹上打印事件.如何递归呢?请打印一个c ++代码.我被困了!! 每次evet都是poped我需要打开子文件夹,取出文件并将其复制到另一个目录中.我不想每2秒列出所有子文件夹,如果有的话,找到文件.效率不高.我需要使用监视文件夹.请帮忙
我想要监控的导演有多个子文件夹.每个子文件夹都有另一个子文件夹,可以在一个时刻包含一个文件.MainFolder->子文件夹 - >每个子文件夹 - >子文件夹 - >文件.
以下是我的代码:
/*
*/
#include <pthread.h>
#include <unistd.h>
#include <iostream>
#include <sys/inotify.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
using namespace std;
vector<string> SS;
void *print_message_function( void *ptr );
int main(int argc, char **argv ){
pthread_t t1;
int fd,fd1,wd,wd1,i=0,i1=0,len=0,len1=0;
int length;
char pathname[100],buf[1024],buf1[1024];
int data;
struct inotify_event *event;
char *message1 = "Thread 1";
FILE …Run Code Online (Sandbox Code Playgroud) 我有一个sip服务器。在extensions.conf中我设置了以下内容:
[extensions.conf]
exten =>1,1,Dial(SIP/1,20,tr)
exten => 1,n,Hangup()
exten => 2,1,Dial(SIP/2,20,tr)
exten => 2,n,Hangup()
Run Code Online (Sandbox Code Playgroud)
我需要能够have outbound calls。我的意思是client 1我想呼叫不同 sip 服务器上的客户端。如何在extensions.conf文件中设置它?
需要帮助。感激不尽