IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Delphi Discussion :

Capturer un évènement du système de fichier


Sujet :

Delphi

  1. #1
    Membre actif

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    479
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 479
    Points : 267
    Points
    267
    Par défaut Capturer un évènement du système de fichier
    Bonjour
    j'ai besoin de contrôler depuis une application le fichier crée par une numérisation sur un scanner.
    L'idée est de ne pas obliger l'utilisateur à retrouver le fichier (par un explorateur intégré) qui vient d'être numérisé pour le sélectionner puis l'afficher dans l'application en vue du rattachement à une base de données.
    Pour cela j'imagine de capturer l'évènement windows (s'il existe) survenant lors de la création puis de la fermeture du dit fichier image.
    Malgré quelques recherches je ne trouve pas d'évènement de ce type. (tout comme le WM_DEVICECHANGE)
    Pourtant cela existe nécessairement puisque l'explorateur se met spontanément à jour quand un fichier est créé sur le disque.

  2. #2
    Membre expert

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2006
    Messages
    661
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Deux Sèvres (Poitou Charente)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Novembre 2006
    Messages : 661
    Points : 3 630
    Points
    3 630
    Billets dans le blog
    2
    Par défaut
    Bonsoir,

    J'ai eu la même problématique pour une de mes applications. Je devais scruter un répertoire et lancer des traitements dès que des fichiers étaient déposés dans ce répertoire. Sans rentrer trop dans les détails (l'application est constituée de plusieurs modules et c'est un de ces modules (un service Windows) qui est chargé de scruter le répertoire), j'ai utilisé un TTimer. Ainsi, je peux régler la fréquence à laquelle on scrute le répertoire.

    Le principe que j'avais adopté est le suivant :
    A chaque scrutation, je vérifie s'il y a un fichier "flag". Si ce fichier existe cela signifie qu'un traitement est en cours donc je ne vais pas plus loin (on verra à la prochaine scrutation). Si le fichier flag est absent, alors je crée le fichier flag et je dresse la liste des fichiers présents et disponibles dans le répertoire. Par disponible, j'entends que le fichier soit accessible en mode "fmShareExclusive" (c'est à dire qu'il ne soit pas locké par une autre application : dans votre cas, ça serait par exemple de temps de scanner l'image). Ensuite, je déplace les fichiers listés dans un répertoire de travail et je lance un autre module qui réalise le traitement. A la fin dudit traitement, le fichier de flag est supprimé.
    Mon site - Mes tutoriels - GitHub - N'oubliez pas de consulter les FAQ Delphi et les cours et tutoriels Delphi

  3. #3
    Expert éminent
    Avatar de Lung
    Profil pro
    Analyste-programmeur
    Inscrit en
    Mai 2002
    Messages
    2 665
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Analyste-programmeur
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2002
    Messages : 2 665
    Points : 6 974
    Points
    6 974
    Par défaut
    Pour surveiller un répertoire, il y a aussi des API.
    Regarde du côté de https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx et https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx
    L'urgent est fait, l'impossible est en cours, pour les miracles prévoir un délai. ___ Écrivez dans un français correct !!

    C++Builder 5 - Delphi 6#2 Entreprise - Delphi 2007 Entreprise - Delphi 2010 Architecte - Delphi XE Entreprise - Delphi XE7 Entreprise - Delphi 10 Entreprise - Delphi 10.3.2 Entreprise - Delphi 10.4.2 Entreprise - Delphi 11.1 Entreprise
    OpenGL 2.1 - Oracle 10g - Paradox - Interbase (XE) - PostgreSQL (15.4)

  4. #4
    Rédacteur/Modérateur
    Avatar de Andnotor
    Inscrit en
    Septembre 2008
    Messages
    5 709
    Détails du profil
    Informations personnelles :
    Localisation : Autre

    Informations forums :
    Inscription : Septembre 2008
    Messages : 5 709
    Points : 13 172
    Points
    13 172
    Par défaut
    En plus de ce que propose Lung, il y a aussi SHChangeNotifyRegister qui travaille lui par message (ShlObj.pas).

  5. #5
    Membre expert

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2006
    Messages
    661
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Deux Sèvres (Poitou Charente)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Novembre 2006
    Messages : 661
    Points : 3 630
    Points
    3 630
    Billets dans le blog
    2
    Par défaut
    Citation Envoyé par Andnotor Voir le message
    En plus de ce que propose Lung, il y a aussi SHChangeNotifyRegister qui travaille lui par message (ShlObj.pas).
    Dans ma solution, j'avais testé SHChangeNotifyRegister, mais cela me posait des problèmes. L'application est bien avertie lorsqu'un nouveau fichier apparait dans le répertoire mais les traitements que je lançais ensuite bloquaient. Je lançais une "ocrisation" des images or, l'ocr utilisé ne disposait que d'une seule licence. Les fichiers devaient donc être traités un par un. Avec SHChangeNotifyRegister, à chaque apparition de fichier dans le répertoire à scruter déclenchait le traitement d'ocirsation et en cas de conflit (une nouvelle ocrisation était demandée alors que la précédente n'était pas terminée) cela bloquait l'OCR et donc toute la chaine de traitement.

    La méthode avec le timer et un fichier de flag n'est peut être pas la plus "belle" mais elle permet d'être entièrement paramétrable et contrôlable simplement.
    Mon site - Mes tutoriels - GitHub - N'oubliez pas de consulter les FAQ Delphi et les cours et tutoriels Delphi

  6. #6
    Rédacteur/Modérateur
    Avatar de Andnotor
    Inscrit en
    Septembre 2008
    Messages
    5 709
    Détails du profil
    Informations personnelles :
    Localisation : Autre

    Informations forums :
    Inscription : Septembre 2008
    Messages : 5 709
    Points : 13 172
    Points
    13 172
    Par défaut
    Cela n'empêche pas d'empiler les fichiers pour les traiter un à un.

  7. #7
    Membre expert

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2006
    Messages
    661
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Deux Sèvres (Poitou Charente)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Novembre 2006
    Messages : 661
    Points : 3 630
    Points
    3 630
    Billets dans le blog
    2
    Par défaut
    Citation Envoyé par Andnotor Voir le message
    Cela n'empêche pas d'empiler les fichiers pour les traiter un à un.
    Tout à fait, mais il faut compter aussi sur le scan des images qui peut prendre du temps : le logiciel du scanner crée l'enveloppe du fichier puis écrit au fur et à mesure dans les fichiers (dans mon cas c'était des TIFF pouvant être multi pages). Le SHChangeNotifyRegister me notifiait à chaque nouveau fichier créé mais le fichier pouvait être locké car le scan pas terminé... Il ne fallait donc pas lancer l'ocr tout de suite (et tout ce qui suit : reconnaissance du document pour le classer dans la GED, si c'était une facture, reconnaissance des lignes pour enregistrer automatiquement les lignes comptables correspondantes dans l'outil de compta...). C'est pour différentes raisons de ce style que j'ai finalement adopté cette solution (même des solutions comme WatchDirectory par exemple ne répondait pas au besoin).

    En tout cas, il y a plusieurs méthodes pour répondre à la question initiale et évidemment tout dépend des besoins et contraintes
    Mon site - Mes tutoriels - GitHub - N'oubliez pas de consulter les FAQ Delphi et les cours et tutoriels Delphi

  8. #8
    Membre actif

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    479
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 479
    Points : 267
    Points
    267
    Par défaut
    Bonjour

    merci à vous

    à ceci près que je ne sais pas dans quel répertoire le fichier numérisé va arriver je vais tester SHChangeNotifyRegister. je vous tiens au courant.

  9. #9
    Membre expert
    Avatar de LadyWasky
    Femme Profil pro
    Inscrit en
    Juin 2004
    Messages
    2 932
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 53
    Localisation : France, Hauts de Seine (Île de France)

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 932
    Points : 3 565
    Points
    3 565
    Par défaut
    Franchement j'ai été confronté à la même histoire et j'ai aussi opté pour la même solution de gbegreg.
    Mais cela n'est valable que pour un ou des répertoires bien autentifiés et que ça oblige à parcourir et faire une liste de tous les fichiers en vérifiant que le dit fichier n'existe pas déjà dans la liste des fichiers déjà connus.

    Ca peut devenir lourd pour le réseau quand on commence à avoir beaucoup de fichiers.

    L'autre solution est d'utiliser en effet l'Api Windows et dès que la création d'un nouveau fichier est détectée, de programmer avec un timer, le traitement du dit fichier 5 ou 10 minutes plus tard. Ca peut se faire avec une ttable en mémoire, un champ Tdatetime (heure de déclenchement du traitement), un champ string (chemin vers le fichier), et un Timer qui interroge cette table une fois par minute. If Now>Champ datetime Then (desactive timer, on envoie le ou les fichiers dans la base de donnée, réactive timer)

    5 ou 10 minutes, c'est le temps d'un café et personne ne t'en voudra si c'est pas fait en temps réel
    Bidouilleuse Delphi

  10. #10
    Membre actif

    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    479
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 479
    Points : 267
    Points
    267
    Par défaut
    Bonjour

    il s'agit de capter dans une application le résultat d'un numérisation de document en partant du principe que l'on ne sait pas où le fichier image sera déposé. Par contre pas question d'attendre plus de quelques secondes.

    J'ai trouvé ce tuto qui exploite ReadDirectoryChangesW fonctionne fonctionne. Il faut juste y ajouter quelques filtres pour ne capter que les évènements intéressants.

    Merci

  11. #11
    Membre expert
    Avatar de LadyWasky
    Femme Profil pro
    Inscrit en
    Juin 2004
    Messages
    2 932
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 53
    Localisation : France, Hauts de Seine (Île de France)

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 932
    Points : 3 565
    Points
    3 565
    Par défaut
    Bah en fait, la solution de gbegreg (message numéro 2) est exactement adapté à ton besoin, elle est même très pertinente, couplé à ReadDirectoryChangesW
    Bidouilleuse Delphi

  12. #12
    Membre régulier
    Profil pro
    Inscrit en
    Décembre 2010
    Messages
    71
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2010
    Messages : 71
    Points : 102
    Points
    102
    Par défaut
    Salut,
    j'avais commencé un truc il y a longtemps mais je ne l'avais pas fini et donc pas forcement utilisé et testé, si ça peut aider comme base de départ...
    De souvenir l'idée de départ était de surveiller un répertoire (TThreadSurveillanceDirectory) et de voir si les fichiers étaient ouvert en modification (TThreadFile) etc...ou de surveiller seulement certains fichiers (TThreadSurveillanceFile)...et ensuite lancé un TProcess etc...( C'était un début de test donc loin d'être aboutit à l'idée de départ )
    bon en gros je balance ce que j'ai retrouvé et regarde si tu peux en faire quelque chose
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    unit ThreadSurFile;
     
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, ExtCtrls, SyncObjs;
     
    type
     
      PFILE_NOTIFY_INFORMATION = ^TFILE_NOTIFY_INFORMATION;
      FILE_NOTIFY_INFORMATION = packed record
        NextEntryOffset : DWORD;
        Action : DWORD;
        FileNameLength : DWORD;
        FileName : array [0..1023] of WideChar;
      end;
      TFILE_NOTIFY_INFORMATION = FILE_NOTIFY_INFORMATION;
     
      TProcess = procedure of object;
      TThreadFile = class;
     
      TListTStrings = array of TStrings;
     
      TThreadSurveillanceDirectory = class(TThread)
      private
        { Déclarations privées }
        FDirectoryInProgress : string;
        FDirectoryMonitorSrc : string;
        FUpdateTStrings1 : TStrings;
        FUpdateTStrings2 : TStrings;
        FTimeWait : Integer;
    //    FProcess : TProcess;
        HandleDirectory : THandle;
        OverLapped : TOverlapped;
        ListInfo : TStrings;
        dwShareMode : Cardinal;
        FFollowedFile : Integer;
    //    FThread : THandle;
        ThreadFile : TThreadFile;
        ArrayThreadFile : TThreadList;
        List : TList;
        FhLogWnd : HWND;
        FdwNotifyFilter : Cardinal;
        EventThread : TEvent;
        procedure SetdwNotifyFilter(Value: Cardinal);
        procedure SetDirectoryMonitorSrc(Value: string);
        procedure MAJAffichage;
        procedure WMUserStop(var Msg: TMessage); message WM_USER;
    //    procedure ThreadProcess;
      protected
        { Déclarations protégées }
      public
    //    constructor Create(const aDirectoryMonitorSrc: string; aUpdateTStrings: TListTStrings = nil; aFollowedFile: Integer = -1;
    //      aProcess: TProcess = nil; adwNotifyFilter: Cardinal = 19; aTimeWait : Integer = 1000);
        constructor Create(const aDirectoryMonitorSrc: string; aUpdateTStrings: TListTStrings = nil; aFollowedFile: Integer = -1;
          adwNotifyFilter: Cardinal = 19; aTimeWait : Integer = 1000);
        destructor Destroy; override;
        procedure Execute; override;
      published
        property dwNotifyFilter : Cardinal read FdwNotifyFilter write SetdwNotifyFilter default 19;
        property DirectoryMonitorSrc : string read FDirectoryMonitorSrc write SetDirectoryMonitorSrc;
      end;
     
       TThreadSurveillanceFile = class(TThread)
      private
        { Déclarations privées }
        FFileNameProgress : TStringList;
        FFileNameSrc : TStringList;
        FUpdateTStrings1 : TStrings;
        FUpdateTStrings2 : TStrings;
        FTimeWait : Integer;
        OverLapped : TOverlapped;
    //    FProcess : TProcess;
        ListInfo : TStrings;
        FFollowedFile : Integer;
    //    FThread : THandle;
        ThreadFile : TThreadFile;
        ArrayThreadFile : TThreadList;
        List : TList;
        FhLogWnd : HWND;
        EventThread : TEvent;
        procedure SetFileNameSrc(Value: TStringList);
        procedure MAJAffichage;
        procedure WMUserStop(var Msg: TMessage); message WM_USER;
    //    procedure ThreadProcess;
      protected
        { Déclarations protégées }
      public
    //    constructor Create(const aFileName: TStringList; aUpdateTStrings: TStrings = nil; aFollowedFile: Integer = -1;
    //      aProcess: TProcess = nil);
        constructor Create(const aFileName: TStringList; aUpdateTStrings: TListTStrings = nil;
          aFollowedFile: Integer = -1; aTimeWait : Integer = 1000);
        destructor Destroy; override;
        procedure Execute; override;
      published
        property FileName : TStringList read FFileNameSrc write SetFileNameSrc;
      end;
     
      TThreadFile = class(TThread)
      private
        { Déclarations privées }
        ListInfo : TStrings;
        FUpdateTStrings : TStrings;
        FTimeWait : Integer;
        FFileName : string;
        hRecMsg : THandle;
        ReceiveStop : Integer;
        hLogWnd : HWND;
        FFollowedFile : Integer;
        procedure MAJAffichage;
        procedure WMUpdateData(var Msg: TMessage); message WM_USER;
      protected
        constructor CreateSurv(const aFileName: string; aUpdateTStrings: TStrings = nil;
          aFollowedFile: Integer = -1; aTimeWait: Integer = 1000; aRecMsg: THandle = INVALID_HANDLE_VALUE);
      public
        constructor Create(const aFileName: string; aUpdateTStrings: TStrings = nil; aTimeWait: Integer = 1000);
        destructor Destroy; override;
        procedure Execute; override;
      published
      end;
     
    const
      fomNotFound = $01;
      fomReadable = $02;
      fomWritable = $04;
      FILE_LIST_DIRECTORY = $00000001;
      WM_UPDATESTOP = WM_USER + 100;
      WM_UPDATEDATA = WM_USER + 101;
      tfFileNotReadNotWrite = 0;
      tfFileNotFound = 1;
      tfFileReadNotWrite = 2;
      tfFileNotReadWrite = 4;
      tfFileReadWrite = 6;
     
    implementation
     
    {****************************************************************************}
    {****************************************************************************}
    {******************************** TThreadFile *******************************}
    {****************************************************************************}
    {****************************************************************************}
     
    function OpenFileInfo(const aFileName: string): Integer;
    var
      FileHandle : integer;
    begin
      Result := 0;
      //Test si le fichier existe
      if not FileExists(aFileName) then
      begin
        Result := fomNotFound;
        Exit;
      end;
      //Test si le fichier peut être ouvert en lecture
      FileHandle := FileOpen(aFileName, fmOpenRead or fmShareDenyWrite);
      if FileHandle >= 0 then
      begin
        FileClose(FileHandle);
        Result := Result or fomReadable;
      end;
      //Test si le fichier peut être ouvert en écriture
      FileHandle := FileOpen(aFileName, fmOpenWrite or fmShareDenyNone); //or fmShareDenyRead);
      if FileHandle >= 0 then
      begin
        FileClose(FileHandle);
        if Result <> 0 then //Pour empêcher la validation pour le fmShareDenyRead
          Result := Result or fomWritable;
      end;
    end;
     
    constructor TThreadFile.CreateSurv(const aFileName: string; aUpdateTStrings: TStrings = nil;
      aFollowedFile: Integer = -1; aTimeWait: Integer = 1000; aRecMsg: THandle = INVALID_HANDLE_VALUE);
    begin
      IsMultiThread := True;
      inherited Create(False);
      if aUpdateTStrings <> nil then
        FUpdateTStrings := aUpdateTStrings;
      FFileName := aFileName;
      FTimeWait := aTimeWait;
      hRecMsg := aRecMsg;
      IsMultiThread := True;
      Priority := tpNormal;
      hLogWnd := AllocateHWnd(WMUpdateData);
      FFollowedFile := aFollowedFile;
    end;
     
    //aFileName : Fichier à surveiller
    //aUpdateTStrings : TStrings pour recevoir des infos de TThreadFile
    //aTimeWait : Temps de scrutation du thread
    constructor TThreadFile.Create(const aFileName: string; aUpdateTStrings: TStrings = nil; aTimeWait: Integer = 1000);
    begin
      IsMultiThread := True;
      inherited Create(False);
      if aUpdateTStrings <> nil then
        FUpdateTStrings := aUpdateTStrings;
      FFileName := aFileName;
      FTimeWait := aTimeWait;
      ReceiveStop := 0;
      hRecMsg := INVALID_HANDLE_VALUE;
      IsMultiThread := True;
      Priority := tpNormal;
      hLogWnd := AllocateHWnd(WMUpdateData);
    end;
     
    procedure TThreadFile.MAJAffichage;
    begin
      if FUpdateTStrings <> nil then
      begin
        FUpdateTStrings.BeginUpdate;
        FUpdateTStrings.AddStrings(ListInfo);
        FUpdateTStrings.EndUpdate;
      end;
    end;
     
    procedure TThreadFile.Execute;
    var
      ofInfoResult : Integer;
      ResFile : string;
    begin
      inherited;
      ListInfo := TStringList.Create;
      try
        while not Terminated do
        begin
          ListInfo.Clear;
          ofInfoResult := OpenFileInfo(FFileName);
          ResFile := '';
          //Lecture des 3 bits pour exploiter le résultat
          {if Odd(T) then
            ResFile := 'Not Found (1)'
          else
          begin
            T := T shr 1;
            if Odd(T) then
              ResFile := ResFile + 'Readable (2) '
            else
              ResFile := ResFile + 'Not Readable (2) ';
            T := T shr 1;
            if Odd(T) then
              ResFile := ResFile + 'Writable (4)'
            else
              ResFile := ResFile + 'Not Writable (4)';
          end;
          ListInfo.Add(Format('%s > Statut : %s',[FFileName, ResFile]));}
          //ou lecture par la valeur
          case ofInfoResult of
            0 : ListInfo.Add(Format('%s > Statut : Not Readable (2) Not Writable (4)',[FFileName]));
            1 : ListInfo.Add(Format('%s > Statut : Not Found',[FFileName]));
            2 : ListInfo.Add(Format('%s > Statut : Readable (2) Not Writable (4)',[FFileName]));
            4 : ListInfo.Add(Format('%s > Statut : Not Readable (2) Writable (4)',[FFileName]));
            6 : ListInfo.Add(Format('%s > Statut : Readable (2) Writable (4)',[FFileName]));
          end;
          Synchronize(MAJAffichage);
          if hRecMsg <> INVALID_HANDLE_VALUE then
          begin
            if FFollowedFile = ofInfoResult then
            begin
              PostMessage(hRecMsg, WM_UPDATESTOP, Self.Handle, ofInfoResult);
              Terminate;
            end;
          end;
          Sleep(FTimeWait);
        end;
      finally
        ListInfo.Free;
      end;
    end;
     
    procedure TThreadFile.WMUpdateData(var Msg: TMessage);
    begin
      if Msg.Msg = WM_UPDATEDATA then
        ReceiveStop := Msg.LParam;
    end;
     
    destructor TThreadFile.Destroy;
    begin
      if hLogWnd <> INVALID_HANDLE_VALUE then
        DeallocateHWnd(hLogWnd);
      inherited;
    end;
     
    {****************************************************************************}
    {****************************************************************************}
    {************************* TThreadSurveillanceFile **************************}
    {****************************************************************************}
    {****************************************************************************}
     
    {procedure TThreadSurveillanceFile.ThreadProcess;
    begin
      FProcess;
    end;
     
    function StartProcessFile(Sender: TThreadSurveillanceFile): integer; stdcall;
    begin
      try
        Sender.ThreadProcess;
        Result := 0;
      except
        Result := -1;
      end;
    end;}
     
    procedure TThreadSurveillanceFile.SetFileNameSrc(Value: TStringList);
    begin
      if not FFileNameSrc.Equals(Value) then
      begin
        FFileNameSrc := Value;
        EventThread.SetEvent;
      end;
    end;
     
    procedure TThreadSurveillanceFile.WMUserStop(var Msg: TMessage);
    var
    //  ThreadID    : Cardinal;
      I           : Integer;
    begin
      if Msg.Msg = WM_UPDATESTOP then
      begin
        if Msg.LParam = FFollowedFile then
        begin
          if Msg.WParam <> 0 then
          begin
            List := ArrayThreadFile.LockList;
            if List.Count <> 0 then
            begin
              for I := 0 to List.Count - 1 do
              begin
                ThreadFile := List.Items[0];
                if ThreadFile.Handle = Msg.WParam then
                  Break;
              end;
              ThreadFile.Terminate;
              {if Assigned(FProcess) then
              begin
                FThread := CreateThread(nil, 0, @StartProcessFile, Self, 0, ThreadID);
                if WaitForSingleObject(FThread, 1000) = WAIT_TIMEOUT then
                begin
                  CloseHandle(FThread);
                end
                else
                begin
                  CloseHandle(FThread);
                end;
              end;}
              ThreadFile.WaitFor;
              FreeAndNil(ThreadFile);
              List.Delete(I);
            end;
            ArrayThreadFile.UnlockList;
          end;
        end;
      end;
    end;
     
    //aFileName : Liste de fichier à surveiller
    //aUpdateTStrings : Liste de TStrings pour recevoir des infos TThreadSurveillanceFile et TThreadFile
    //aFollowedFile : Type d'ouverture rechercher provoquant l'arrêt du thread
    //aTimeWait : Temps de scrutation du thread
    //aProcess : Pour lancer un process externe
    //constructor TThreadSurveillanceFile.Create(const aFileName: TStringList; aUpdateTStrings: TStrings; aFollowedFile: Integer = -1;
    //      aProcess: TProcess = nil);
    constructor TThreadSurveillanceFile.Create(const aFileName: TStringList; aUpdateTStrings: TListTStrings = nil;
      aFollowedFile: Integer = -1; aTimeWait : Integer = 1000);
    begin
      IsMultiThread := True;
    //  inherited Create(CreateSuspended);
      inherited Create(False);
    //  FreeOnTerminate := True;
      if aUpdateTStrings <> nil then
      begin
        FUpdateTStrings1 := aUpdateTStrings[0];
        if High(aUpdateTStrings) <> 1  then
          FUpdateTStrings2 := aUpdateTStrings[0]
        else
          FUpdateTStrings2 := aUpdateTStrings[1]
      end;
    //  FProcess := aProcess;
      FTimeWait := aTimeWait;
      FFileNameSrc := TStringList.Create;
      FFileNameSrc.AddStrings(aFileName);
      FhLogWnd := INVALID_HANDLE_VALUE;
      EventThread := TEvent.Create(nil, False, False, 'EventThread');
      Priority := tpNormal;
      FFollowedFile := aFollowedFile;
    //  if CreateSuspended then
    //    Resume;
    end;
     
    destructor TThreadSurveillanceFile.Destroy;
    var
      I: Integer;
    begin
      FreeAndNil(EventThread);
      if ArrayThreadFile <> nil then
      begin
        List := ArrayThreadFile.LockList;
        for I := List.Count-1 downto 0 do
        begin
          ThreadFile := List.Items[I];
          ThreadFile.Terminate;
          ThreadFile.WaitFor;
          FreeAndNil(ThreadFile);
        end;
        ArrayThreadFile.UnlockList;
        ArrayThreadFile.Free;
      end;
      FFileNameSrc.Free;
      if FhLogWnd <> INVALID_HANDLE_VALUE then
        DeallocateHWnd(FhLogWnd);
      inherited;
    end;
     
    procedure TThreadSurveillanceFile.Execute;
    var
      I, J    : Integer;
      NotSur  : Boolean;
    begin
      inherited;
      ListInfo := TStringList.Create;
      FFileNameProgress := TStringList.Create;
      OverLapped.hEvent := CreateEvent(nil, False, False, nil);
      try
        FFileNameProgress.Clear;
        for I := 0 to FFileNameSrc.Count - 1 do
          ListInfo.Add(Format('ThreadSurveillanceFile Start ! FileName : %s',[FFileNameSrc[I]]));
        Synchronize(MAJAffichage);
        while not Terminated do
        begin
          //Si changement configuration de surveillance
          //Si changement de répertoire
          if not (FFileNameSrc.Equals(FFileNameProgress)) then
          begin
            ListInfo.Clear;
            if FhLogWnd = INVALID_HANDLE_VALUE then
              FhLogWnd := AllocateHWnd(WMUserStop);
            if ArrayThreadFile = nil then
              ArrayThreadFile := TThreadList.Create;
            List := ArrayThreadFile.LockList;
            if List.Count = 0 then
              FFileNameProgress.Clear;
            FFileNameProgress.AddStrings(FFileNameSrc);
     
            for I := 0 to FFileNameProgress.Count - 1 do
            begin
              if ArrayThreadFile <> nil then
                ListInfo.Add(Format('Update ThreadSurveillanceFile ! FileName : %s',[FFileNameSrc[I]]));
              //On ouvre la list de thread en cours
              NotSur := False;
              //On vérifie si le fichier n'est pas déjà suivie
              for J := 0 to List.Count - 1 do
              begin
                ThreadFile := List.Items[J];
                if ThreadFile.FFileName = FFileNameProgress[I] then
                begin
                  NotSur := True;
                  Break;
                end;
              end;
              if not NotSur then
              begin
                ThreadFile := TThreadFile.CreateSurv(FFileNameProgress[I], FUpdateTStrings2, FFollowedFile, FTimeWait, FhLogWnd);
                ArrayThreadFile.Add(ThreadFile);
              end;
            end;
            Synchronize(MAJAffichage);
            ArrayThreadFile.UnlockList;
          end;
          //Attente d'une modification
          repeat
            //Création d'un événement pour relancer une nouvelle configuration
            if EventThread.WaitFor(0) = wrSignaled then
              I := 0;
            //Pour recevoir les messages du threadfile
            Application.ProcessMessages;
          until Terminated or (not FFileNameSrc.Equals(FFileNameProgress)) or (List.Count = 0);
        end;
      finally
        ListInfo.Free;
        FFileNameProgress.Free;
        CloseHandle(OverLapped.hEvent);
      end;
    end;
     
    procedure TThreadSurveillanceFile.MAJAffichage;
    begin
      if FUpdateTStrings1 <> nil then
      begin
        FUpdateTStrings1.BeginUpdate;
        FUpdateTStrings1.AddStrings(ListInfo);
        FUpdateTStrings1.EndUpdate;
      end;
    end;
     
    {****************************************************************************}
    {****************************************************************************}
    {*********************** TThreadSurveillanceDirectory ***********************}
    {****************************************************************************}
    {****************************************************************************}
     
    {procedure TThreadSurveillanceDirectory.ThreadProcess;
    begin
      FProcess;
    end;
     
    function StartProcess(Sender: TThreadSurveillanceDirectory): integer; stdcall;
    begin
      try
        Sender.ThreadProcess;
        Result := 0;
      except
        Result := -1;
      end;
    end;}
     
    procedure TThreadSurveillanceDirectory.SetdwNotifyFilter(Value: Cardinal);
    begin
      if FdwNotifyFilter <> Value then
      begin
        FdwNotifyFilter := Value;
        EventThread.SetEvent;
      end;
    end;
     
    procedure TThreadSurveillanceDirectory.SetDirectoryMonitorSrc(Value: string);
    begin
      if FDirectoryMonitorSrc <> Value then
      begin
        if DirectoryExists(FDirectoryMonitorSrc) then
        begin
          FDirectoryMonitorSrc := Value;
          EventThread.SetEvent;
        end;
      end;
    end;
     
    procedure TThreadSurveillanceDirectory.WMUserStop(var Msg: TMessage);
    var
    //  ThreadID  : Cardinal;
      I         : Integer;
    begin
      if Msg.Msg = WM_UPDATESTOP then
      begin
        if Msg.LParam = FFollowedFile then
        begin
          if Msg.WParam <> 0 then
          begin
            List := ArrayThreadFile.LockList;
            if List.Count <> 0 then
            begin
              for I := 0 to List.Count - 1 do
              begin
                ThreadFile := List.Items[I];
                if ThreadFile.Handle = Msg.WParam then
                  Break;
              end;
              ThreadFile.Terminate;
              {if Assigned(FProcess) then
              begin
                FThread := CreateThread(nil, 0, @StartProcess, Self, 0, ThreadID);
                if WaitForSingleObject(FThread, 1000) = WAIT_TIMEOUT then
                begin
                  CloseHandle(FThread);
                end
                else
                begin
                  CloseHandle(FThread);
                end;
              end;}
              ThreadFile.WaitFor;
              FreeAndNil(ThreadFile);
              List.Delete(I);
            end;
            ArrayThreadFile.UnlockList;
          end;
        end;
      end;
    end;
     
    //aDirectoryMonitorSrc : répertoire de fichier à surveiller
    //aUpdateTStrings : Liste de TStrings pour recevoir des infos TThreadSurveillanceDirectory et TThreadFile
    //aFollowedFile : Type d'ouverture rechercher provoquant l'arrêt du thread
    //adwNotifyFilter : Type de modifications surveillées dans le répertoire
    //aTimeWait : Temps de scrutation du thread
    //aProcess : Pour lancer un process externe
    //constructor TThreadSurveillanceDirectory.Create(const aDirectoryMonitorSrc: string; aUpdateTStrings: TListTStrings = nil;
    //  aFollowedFile: Integer = -1; aProcess: TProcess = nil; adwNotifyFilter: Cardinal = 19; aTimeWait : Integer = 1000);
    constructor TThreadSurveillanceDirectory.Create(const aDirectoryMonitorSrc: string; aUpdateTStrings: TListTStrings = nil;
      aFollowedFile: Integer = -1; adwNotifyFilter: Cardinal = 19; aTimeWait : Integer = 1000);
    begin
      IsMultiThread := True;
    //  inherited Create(CreateSuspended);
      inherited Create(False);
    //  FreeOnTerminate := True;
      if aUpdateTStrings <> nil then
      begin
        FUpdateTStrings1 := aUpdateTStrings[0];
        if High(aUpdateTStrings) <> 1  then
          FUpdateTStrings2 := aUpdateTStrings[0]
        else
          FUpdateTStrings2 := aUpdateTStrings[1]
      end;
    //  FProcess := aProcess;
      FDirectoryMonitorSrc := aDirectoryMonitorSrc;
      FhLogWnd := INVALID_HANDLE_VALUE;
      FTimeWait := aTimeWait;
      EventThread := TEvent.Create(nil, False, False, 'EventThread');
      Priority := tpNormal;
      if FdwNotifyFilter <> adwNotifyFilter then
        FdwNotifyFilter := adwNotifyFilter;
      FFollowedFile := aFollowedFile;
    //  if CreateSuspended then
    //    Resume;
    end;
     
    destructor TThreadSurveillanceDirectory.Destroy;
    var
      I: Integer;
    begin
      FreeAndNil(EventThread);
      if ArrayThreadFile <> nil then
      begin
        List := ArrayThreadFile.LockList;
        for I := List.Count-1 downto 0 do
        begin
          ThreadFile := List.Items[I];
          ThreadFile.Terminate;
          ThreadFile.WaitFor;
          FreeAndNil(ThreadFile);
        end;
        ArrayThreadFile.UnlockList;
        ArrayThreadFile.Free;
      end;
      if FhLogWnd <> INVALID_HANDLE_VALUE then
        DeallocateHWnd(FhLogWnd);
      inherited;
    end;
     
    procedure TThreadSurveillanceDirectory.Execute;
    var
      Buffer1 : FILE_NOTIFY_INFORMATION;
      Buffer2 : FILE_NOTIFY_INFORMATION;
      Return  : DWord;
      Action1 : DWord;
    //  Action2 : DWord;
      Str1    : WideString;
      Str2    : WideString;
      Waiting : Boolean;
      I       : Integer;
      NotSur  : Boolean;
    begin
      inherited;
      ListInfo := TStringList.Create;
      FillChar(Overlapped, SizeOf(OverLapped), #0);
      OverLapped.hEvent := CreateEvent(nil, False, False, nil);
      try
        HandleDirectory := INVALID_HANDLE_VALUE;
        FDirectoryInProgress := '';
    //    dwNotifyFilter := FILE_NOTIFY_CHANGE_FILE_NAME or FILE_NOTIFY_CHANGE_DIR_NAME
    //      or FILE_NOTIFY_CHANGE_LAST_WRITE or FILE_NOTIFY_CHANGE_ATTRIBUTES;
        dwShareMode := FILE_SHARE_READ or FILE_SHARE_DELETE or FILE_SHARE_WRITE;
        ListInfo.Add(Format('ThreadSurveillanceDirectory Start ! Directory : %s',[FDirectoryMonitorSrc]));
        Synchronize(MAJAffichage);
        while not Terminated do
        begin
          //Si changement configuration de surveillance
          //Si changement de répertoire
          if (FDirectoryMonitorSrc <> FDirectoryInProgress) then
          begin
            ListInfo.Clear;
            if HandleDirectory <> INVALID_HANDLE_VALUE then
            begin
              ListInfo.Add(Format('Update ThreadSurveillanceDirectory ! dwNotifyFilter : %d',[dwNotifyFilter]));
              CloseHandle(HandleDirectory);
              HandleDirectory := INVALID_HANDLE_VALUE;
            end;
            FDirectoryInProgress := FDirectoryMonitorSrc;
            if FDirectoryInProgress <> '' then
            begin
              FDirectoryInProgress := ExcludeTrailingPathDelimiter(FDirectoryInProgress);
              HandleDirectory := CreateFile(PWideChar(FDirectoryInProgress), FILE_LIST_DIRECTORY, dwShareMode,
                nil, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS or FILE_FLAG_OVERLAPPED, 0);
            end;
            Synchronize(MAJAffichage);
          end;
          if HandleDirectory <> INVALID_HANDLE_VALUE then
          begin
            //ReadDirectoryChangesW permet de voir les changement dans un répertoire
            //msdn.microsoft.com
            if ReadDirectoryChangesW(HandleDirectory, @Buffer1, SizeOf(Buffer1), True,
              dwNotifyFilter, @Return, @OverLapped, nil) then
            begin
              //Attente d'une modification
              repeat
                Waiting := GetOverLappedResult(HandleDirectory, OverLapped, Return, False);
                //Création d'un événement pour relancer une nouvelle configuration
                if EventThread.WaitFor(0) = wrSignaled then
                  FDirectoryInProgress := '';
                //Pour recevoir les messages du threadfile
                Application.ProcessMessages;
              until Waiting or(GetLastError <> ERROR_IO_INCOMPLETE) or Terminated or (FDirectoryMonitorSrc <> FDirectoryInProgress);
              if Waiting and not Terminated and (FDirectoryMonitorSrc = FDirectoryInProgress) then
              begin
                ListInfo.Clear;
                Action1 := Buffer1.Action;
                Str1 := Copy(Buffer1.FileName,0,Buffer1.FileNameLength div 2);
                if Action1 = FILE_ACTION_RENAMED_OLD_NAME then
                begin
                  Move(Buffer1.FileName[(Buffer1.NextEntryOffset div 2)-6], Buffer2, SizeOf(Buffer2));
      //              Action2 := Buffer2.Action;
                  Str2 := Copy(Buffer2.FileName, 0, Buffer2.FileNameLength div 2);
                  ListInfo.Add(FormatDateTime('hh:nn:ss:zzz dd/mm/yyy "FILE_ACTION_RENAMED"',Now));
                  ListInfo.Add('OLD : '+FDirectoryInProgress+'\'+Str1);
                  ListInfo.Add('NEW : '+FDirectoryInProgress+'\'+Str2);
                end;
                if Action1 = FILE_ACTION_MODIFIED then
                begin
                  ListInfo.Add(FormatDateTime('hh:nn:ss:zzz dd/mm/yyy "FILE_ACTION_MODIFIED"',Now));
                  ListInfo.Add('MODIFIED : '+FDirectoryInProgress+'\'+Str1);
                end;
                if Action1 = FILE_ACTION_REMOVED then
                begin
                  ListInfo.Add(FormatDateTime('hh:nn:ss:zzz dd/mm/yyy "FILE_ACTION_REMOVED"',Now));
                  ListInfo.Add('REMOVED : '+FDirectoryInProgress+'\'+Str1);
                end;
                if Action1 = FILE_ACTION_ADDED then
                begin
                  ListInfo.Add(FormatDateTime('hh:nn:ss:zzz dd/mm/yyy "FILE_ACTION_ADDED"',Now));
                  ListInfo.Add('ADD : '+FDirectoryInProgress+'\'+Str1);
                end;
                  Synchronize(MAJAffichage);
                if (FFollowedFile <> -1) and (Action1 = FILE_ACTION_RENAMED_OLD_NAME) then
                begin
                  if FhLogWnd = INVALID_HANDLE_VALUE then
                    FhLogWnd := AllocateHWnd(WMUserStop);
                  if ArrayThreadFile = nil then
                    ArrayThreadFile := TThreadList.Create;
                  //On ouvre la list de thread en cours
                  List := ArrayThreadFile.LockList;
                  NotSur := False;
                  //On vérifie si le fichier n'est pas déjà suivie
                  for I := 0 to List.Count - 1 do
                  begin
                    ThreadFile := List.Items[I];
                    if ThreadFile.FFileName = FDirectoryInProgress+'\'+Str2 then
                    begin
                      NotSur := True;
                      Break;
                    end;
                  end;
                  if not NotSur then
                  begin
                    ThreadFile := TThreadFile.CreateSurv(FDirectoryInProgress+'\'+Str2, FUpdateTStrings2, FFollowedFile, FTimeWait, FhLogWnd);
                    ArrayThreadFile.Add(ThreadFile);
                  end;
                  ArrayThreadFile.UnlockList;
                end;
                if (FFollowedFile <> -1) and (Action1 <> FILE_ACTION_RENAMED_OLD_NAME) then
                begin
                  if FhLogWnd = INVALID_HANDLE_VALUE then
                    FhLogWnd := AllocateHWnd(WMUserStop);
                  if ArrayThreadFile = nil then
                    ArrayThreadFile := TThreadList.Create;
                  List := ArrayThreadFile.LockList;
                  NotSur := False;
                  for I := 0 to List.Count - 1 do
                  begin
                    ThreadFile := List.Items[I];
                    if ThreadFile.FFileName = FDirectoryInProgress+'\'+Str1 then
                    begin
                      NotSur := True;
                      Break;
                    end;
                  end;
                  if not NotSur then
                  begin
                    ThreadFile := TThreadFile.CreateSurv(FDirectoryInProgress+'\'+Str1, FUpdateTStrings2, FFollowedFile, FTimeWait, FhLogWnd);
                    ArrayThreadFile.Add(ThreadFile);
                  end;
                  ArrayThreadFile.UnlockList;
                end;
              end;
            end;
          end;
        end;
      finally
        if HandleDirectory <> INVALID_HANDLE_VALUE then
          CloseHandle(HandleDirectory);
        HandleDirectory := INVALID_HANDLE_VALUE;
        ListInfo.Free;
        CloseHandle(OverLapped.hEvent);
      end;
    end;
     
    procedure TThreadSurveillanceDirectory.MAJAffichage;
    begin
      if FUpdateTStrings1 <> nil then
      begin
        FUpdateTStrings1.BeginUpdate;
        FUpdateTStrings1.AddStrings(ListInfo);
        FUpdateTStrings1.EndUpdate;
      end;
    end;
     
    end.
    @+

Discussions similaires

  1. Capture de l'évènement de sauvegarde de fichier
    Par DrSnake dans le forum ImageJ
    Réponses: 0
    Dernier message: 17/08/2010, 11h53
  2. Capture d'événement de création de fichier
    Par Verbalinsurection dans le forum C++
    Réponses: 11
    Dernier message: 04/10/2007, 18h12
  3. Réponses: 6
    Dernier message: 20/04/2006, 15h44
  4. Peut on manipuler le système de fichier par T-SQL?
    Par WOLO Laurent dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 22/12/2003, 09h19
  5. Le système de fichiers utilisé ?
    Par KORTA dans le forum C
    Réponses: 2
    Dernier message: 17/09/2003, 21h46

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo