-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·3406 lines (2654 loc) · 90.7 KB
/
index.html
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
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Pismo File Mount Development Kit</title>
</head>
<body>
<h1>Pismo File Mount Development Kit build 190</h1>
<p>
Pismo Technic Inc. Copyright 2006-2017 Joe Lowe
<br>
2017.11.16
</p>
<h1>Preface</h1>
<p>
This document is targeted towards software developers who are
utilizing Pismo File Mount to implement or control file systems or
pseudo file systems.
</p>
<h1>Contents</h1>
<ul>
<li><a href=#pfm>Pismo File Mount</a>
<ul>
<li><a href=#desc>Description</a>
</li>
<li><a href=#arch>Architecture</a>
<ul>
<li><a href=#arch-portability>Portability</a>
</li>
<li><a href=#arch-kernel>PFM Kernel Module</a>
</li>
<li><a href=#arch-protocol>PFM Protocol</a>
</li>
<li><a href=#arch-protocol>Servers</a>
</li>
<li><a href=#arch-api>PFM Application Programming Interface</a>
</li>
<li><a href=#arch-cmd>Command Line Interface</a>
</li>
<li><a href=#arch-install>Installer</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href=#pfmap>Pismo File Mount Audit Package</a>
<ul>
<li><a href=#pfmap-shx>Explorer shell extension</a>
</li>
<li><a href=#pfmap-control>Mount Control</a>
</li>
<li><a href=#pfmap-isofs>Formatters</a>
</li>
<li><a href=#pfmap-isofs>CD/DVD image file reader</a>
</li>
<li><a href=#pfmap-zipfs>Zip reader</a>
</li>
<li><a href=#pfmap-tempfs>RAM file system</a>
</li>
<li><a href=#pfmap-pfolder>Private Folder file system</a>
</li>
</ul>
</li>
<li><a href=#kit>PFM Development Kit</a>
<ul>
<li><a href=#kit-languages>Programming Languages</a>
</li>
<li><a href=#kit-c>C Header Files</a>
</li>
<li><a href=#kit-c>C++ Header Files</a>
</li>
<li><a href=#kit-clr>CLR (C#, VB) API Assembly</a>
</li>
<li><a href=#kit-java>Java API Jar</a>
</li>
<li><a href=#kit-samples>Samples</a>
<ul>
<li><a href=#sample-unmount>Mounter application in C, C++, C#, and Java</a>
</li>
<li><a href=#sample-hellofs>Hello World file system application in C, C++, C#, and Java</a>
</li>
<li><a href=#sample-tempfs>Temp file system application in C++ and C#</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href=#apidev>Application Development</a>
<ul>
<li><a href=#appdev-concepts>Concepts</a>
<ul>
<li><a href=#appdev-errors>Errors</a>
</li>
<li><a href=#appdev-mountid>Mount ID</a>
</li>
<li><a href=#appdev-mountsourcename>Mount Source Name</a>
</li>
<li><a href=#appdev-mountendname>Mount End Name</a>
</li>
<li><a href=#appdev-mountpoint>Mount Point</a>
</li>
<li><a href=#appdev-uncname>Mount UNC Name</a>
</li>
<li><a href=#appdev-changeinstance>Change Instances</a>
</li>
</ul>
</li>
<li><a href=#pfmapi>PfmApi interface</a>
<ul>
<li><a href=#pfmapi-factory>PfmApiFactory</a>
</li>
<li><a href=#pfmapi-release>PfmApi::Release</a>
</li>
<li><a href=#pfmapi-mountcreate>PfmApi::MountCreate</a>
</li>
<li><a href=#pfmapi-mountsourcenameopen>PfmApi::MountSourceNameOpen</a>
</li>
<li><a href=#pfmapi-mountendnameopen>PfmApi::MountEndNameOpen</a>
</li>
<li><a href=#pfmapi-mountpointopen>PfmApi::MountPointOpen</a>
</li>
<li><a href=#pfmapi-mountidopen>PfmApi::MountIdOpen</a>
</li>
<li><a href=#pfmapi-mountiterate>PfmApi::MountIterate</a>
</li>
<li><a href=#pfmapi-mountmonitorfactory>PfmApi::MountMonitorFactory</a>
</li>
<li><a href=#pfmapi-filemountfactory>PfmApi::FileMountFactory</a>
</li>
</ul>
</li>
<li><a href=#pfmfilemount>PfmFileMount interface</a>
<ul>
<li><a href=#pfmfilemount-release>PfmFileMount::Release</a>
</li>
<li><a href=#pfmfilemount-cancel>PfmFileMount::Cancel</a>
</li>
<li><a href=#pfmfilemount-start>PfmFileMount::Start</a>
</li>
<li><a href=#pfmfilemount-send>PfmFileMount::Send</a>
</li>
<li><a href=#pfmfilemount-status>PfmFileMount::Status</a>
</li>
<li><a href=#pfmfilemount-waitready>PfmFileMount::WaitReady</a>
</li>
<li><a href=#pfmfilemount-getmount>PfmFileMount::GetMount</a>
</li>
<li><a href=#pfmfilemount-detach>PfmFileMount::Detach</a>
</li>
</ul>
</li>
<li><a href=#pfmfilemountui>PfmFileMountUi</a>
<ul>
<li><a href=#pfmfilemountui-start>PfmFileMountUi::Start</a>
</li>
<li><a href=#pfmfilemountui-complete>PfmFileMountUi::Complete</a>
</li>
<li><a href=#pfmfilemountui-status>PfmFileMountUi::Status</a>
</li>
<li><a href=#pfmfilemountui-querypassword>PfmFileMountUi::QueryPassword</a>
</li>
<li><a href=#pfmfilemountui-clearpassword>PfmFileMountUi::ClearPassword</a>
</li>
</ul>
</li>
<li><a href=#pfmmount>PfmMount interface</a>
<ul>
<li><a href=#pfmmount-release>PfmMount::Release</a>
</li>
<li><a href=#pfmmount-refresh>PfmMount::Refresh</a>
</li>
<li><a href=#pfmmount-unmount>PfmMount::Unmount</a>
</li>
<li><a href=#pfmmount-getmountid>PfmMount::GetMountId</a>
</li>
<li><a href=#pfmmount-getmountflags>PfmMount::GetMountFlags</a>
</li>
<li><a href=#pfmmount-getstatusflags>PfmMount::GetStatusFlags</a>
</li>
<li><a href=#pfmmount-getvolumeflags>PfmMount::GetVolumeFlags</a>
</li>
<li><a href=#pfmmount-getchangeinstance>PfmMount::GetChangeInstance</a>
</li>
<li><a href=#pfmmount-getmountsourcename>PfmMount::GetMountSourceName</a>
</li>
<li><a href=#pfmmount-getmountendname>PfmMount::GetMountEndName</a>
</li>
<li><a href=#pfmmount-getmountpoint>PfmMount::GetMountPoint</a>
</li>
<li><a href=#pfmmount-getuncname>PfmMount::GetUncName</a>
</li>
<li><a href=#pfmmount-getdriveletter>PfmMount::GetDriveLetter</a>
</li>
<li><a href=#pfmmount-getownerid>PfmMount::GetOwnerId</a>
</li>
<li><a href=#pfmmount-getownername>PfmMount::GetOwnerName</a>
</li>
<li><a href=#pfmmount-getformattername>PfmMount::GetFormatterName</a>
</li>
<li><a href=#pfmmount-flush>PfmMount::Flush</a>
</li>
<li><a href=#pfmmount-control>PfmMount::Control</a>
</li>
<li><a href=#pfmmount-waitready>PfmMount::WaitReady</a>
</li>
</ul>
</li>
<li><a href=#pfmmountiterator>PfmMountIterator interface</a>
<ul>
<li><a href=#pfmmountiterator-release>PfmMountIterator::Release</a>
</li>
<li><a href=#pfmmountiterator-next>PfmMountIterator::Next</a>
</li>
</ul>
</li>
<li><a href=#pfmmountmonitor>PfmMountMonitor interface</a>
<ul>
<li><a href=#pfmmountmonitor-release>PfmMountMonitor::Release</a>
</li>
<li><a href=#pfmmountmonitor-wait>PfmMountMonitor::Wait</a>
</li>
<li><a href=#pfmmountmonitor-cancel>PfmMountMonitor::Cancel</a>
</li>
</ul>
</li>
</ul>
</li>
<li><a href=#fsdev>File System Development</a>
<ul>
<li><a href=#fsdev-start>Getting Started</a>
</li>
<li><a href=#fsdev-testing>Testing</a>
</li>
<li><a href=#fsdev-concepts>Concepts</a>
<ul>
<li><a href=#fsdev-errors>Portable Errors</a>
</li>
<li><a href=#fsdev-file>Folders are Files</a>
</li>
<li><a href=#fsdev-names>File Names</a>
</li>
<li><a href=#openid>OpenId and OpenSequence</a>
</li>
<li><a href=#fsdev-delete>Deleted Files</a>
</li>
<li><a href=#fsdev-concurrency>Concurrency</a>
</li>
<li><a href=#pfmmarshallerops>PfmMarshaller???Op objects</a>
</li>
<li><a href=#pfmformatterserializeopen>PfmFormatterSerializeOpen</a>
</li>
<li><a href=#pfmformatterops-open>void* formatterUse</a>
</li>
</ul>
</li>
<li><a href=#pfmmarshaller>PfmMarshaller interface</a>
<ul>
<li><a href=#pfmmarshaller-factory>PfmMarshallerFactory</a>
</li>
<li><a href=#pfmmarshaller-release>PfmMarshaller::Release</a>
</li>
<li><a href=#pfmmarshaller-settrace>PfmMarshaller::SetTrace</a>
</li>
<li><a href=#pfmmarshaller-setstatus>PfmMarshaller::SetStatus</a>
</li>
<li><a href=#pfmmarshaller-convertsystemerror>PfmMarshaller::ConvertSystemError</a>
</li>
<li><a href=#pfmmarshaller-getpassword>PfmMarshaller::GetPassword</a>
</li>
<li><a href=#pfmmarshaller-clearpassword>PfmMarshaller::ClearPassword</a>
</li>
<li><a href=#pfmmarshaller-servedispatch>PfmMarshaller::ServeDispatch</a>
</li>
<li><a href=#pfmmarshaller-print>PfmMarshaller::Print</a>
</li>
<li><a href=#pfmmarshaller-vprintf>PfmMarshaller::Vprintf</a>
</li>
<li><a href=#pfmmarshaller-printf>PfmMarshaller::Printf</a>
</li>
<li><a href=#pfmmarshaller-line>PfmMarshaller::Line</a>
</li>
</ul>
</li>
<li><a href=#pfmformatterdispatch>PfmFormatterDispatch</a>
<ul>
<li><a href=#pfmformatterdispatch-open>PfmFormatterDispatch::Open</a>
</li>
<li><a href=#pfmformatterdispatch-replace>PfmFormatterDispatch::Replace</a>
</li>
<li><a href=#pfmformatterdispatch-move>PfmFormatterDispatch::Move</a>
</li>
<li><a href=#pfmformatterdispatch-movereplace>PfmFormatterDispatch::MoveReplace</a>
</li>
<li><a href=#pfmformatterdispatch-delete>PfmFormatterDispatch::Delete</a>
</li>
<li><a href=#pfmformatterdispatch-close>PfmFormatterDispatch::Close</a>
</li>
<li><a href=#pfmformatterdispatch-flushfile>PfmFormatterDispatch::FlushFile</a>
</li>
<li><a href=#pfmformatterdispatch-list>PfmFormatterDispatch::List</a>
</li>
<li><a href=#pfmformatterdispatch-listend>PfmFormatterDispatch::ListEnd</a>
</li>
<li><a href=#pfmformatterdispatch-read>PfmFormatterDispatch::Read</a>
</li>
<li><a href=#pfmformatterdispatch-write>PfmFormatterDispatch::Write</a>
</li>
<li><a href=#pfmformatterdispatch-setsize>PfmFormatterDispatch::SetSize</a>
</li>
<li><a href=#pfmformatterdispatch-capacity>PfmFormatterDispatch::Capacity</a>
</li>
<li><a href=#pfmformatterdispatch-flushmedia>PfmFormatterDispatch::FlushMedia</a>
</li>
<li><a href=#pfmformatterdispatch-control>PfmFormatterDispatch::Control</a>
</li>
<li><a href=#pfmformatterdispatch-mediainfo>PfmFormatterDispatch::MediaInfo</a>
</li>
<li><a href=#pfmformatterdispatch-access>PfmFormatterDispatch::Access</a>
</li>
<li><a href=#pfmformatterdispatch-readxattr>PfmFormatterDispatch::ReadXattr</a>
</li>
<li><a href=#pfmformatterdispatch-writexattr>PfmFormatterDispatch::WriteXattr</a>
</li>
</ul>
</li>
<li><a href=#fsdev-datatypes>Data Types</a>
<ul>
<li><a href=#pfmmountflags>mountFlags</a>
</li>
<li><a href=#pfmunmountflags>unmountFlags</a>
</li>
<li><a href=#pfmstatusflags>statusFlags</a>
</li>
<li><a href=#pfmerror>pfmError</a>
</li>
<li><a href=#pfmfilemountflags>fileMountFlags</a>
</li>
<li><a href=#pfmfiletype>fileType</a>
</li>
<li><a href=#pfmfileflags>fileFlags</a>
</li>
<li><a href=#pfmcolor>color</a>
</li>
<li><a href=#pfmtime>time</a>
</li>
<li><a href=#pfmaccesslevel>accessLevel</a>
</li>
<li><a href=#pfmvolumeflags>volumeFlags</a>
</li>
<li><a href=#pfmflushflags>flushFlags</a>
</li>
<li><a href=#pfmattribs>PfmAttribs</a>
</li>
<li><a href=#pfmopenattribs>PfmOpenAttribs</a>
</li>
<li><a href=#pfmnamepart>PfmNamePart</a>
</li>
<li><a href=#pfmmediainfo>PfmMediaInfo</a>
</li>
<li><a href=#pfmfilemountcreateparams>PfmFileMountCreateParams</a>
</li>
<li><a href=#pfmmountcreateparams>PfmMountCreateParams</a>
</li>
<li><a href=#pfmmarshallerserveparams>PfmMarshallerServeParams</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h1><a name="pfm"></a>Pismo File Mount</a></h1>
<h2><a name="desc"></a>Description</a></h2>
<p>
Pismo File Mount is a portable operating system extension
that enables the development of file systems and file
system extensions using common user mode application
development tools.
</p>
<p>
Applications can utilize Pismo File Mount to expose data
through the file system as mounted volumes. Volumes are
exposed through drive letters, UNC paths, or through a
mount point on the system volume.
</p>
<p>
PFM is cross platform, allowing implementation of file
systems for Windows, Mac, and Linux operating systems.
</p>
<h2><a name="arch"></a>Architecture</a></h2>
<p>
PFM fundamentally implements a client-server architecture where
the client sends file system requests to a local or remote server
for processing.
</p>
<p>
The client is the PFM kernel module (driver), and integrates with
the local operating system to allow the system and applications to
access the file system provided by the server.
</p>
<p>
The server is the local or remote application that utilizes PFM
to expose file system data.
</p>
<h3><a name="arch-portability"></a>Portability</a></h3>
<p>
PFM is available for Windows, Mac, and Linux operating systems. The
PFM API and interfaces are consistent across all three platforms.
</p>
<p>
The PFM API and interfaces can be used and implemented via a
variety of programming languages, including:
<ul>
<li>C</li>
<li>C++</li>
<li>CLR languages (C#, VB, etc., using .Net or Mono)</li>
<li>Java and other JVM targeting languages</li>
</ul>
<p>
PFM operating system support and programming language flexibility
make it an efficient solution for implementing portable file
system projects and products.
</p>
<h3><a name="arch-kernel"></a>PFM Kernel Module</a></h3>
<p>
The core of the Pismo File Mount system extension is a
kernel module that interfaces with the various core
operating system interfaces, providing an installable
file system that redirects application requests to a
user mode or remote file system implementation.
</p>
<h3><a name="arch-protocol"></a>PFM Protocol</a></h3>
<p>
The communication between the PFM kernel module and the file system
is done over a socket using the PFM Protocol. Most developers have
no need to deal directly with the PFM Protocol.
</p>
<h3><a name="arch-protocol"></a>Servers</a></h3>
<p>
PFM Servers are any applications that utilize PFM to expose file
system data.
</p>
<p>
The PFM Audit Package is an application that contains a variety
of PFM server imlpementations. These servers are referred to as
"Formatters", each implemented in a loadable DLL that can decode
container and/or archive files and expose the contents through
the file system.
</p>
<p>
Other applications will typically implement PFM servers directly
using the <a href=#arch-api>PFM API</a>, not using the PFM Audit
Package formatter architecture.
</p>
<h3><a name="arch-api"></a>PFM Application Programming Interface</a></h3>
<p>
Applications interact with and control PFM using the
<a href=#pfmapi>PfmApi</a> interface and the associated interfaces
<a href=#pfmmount>PfmMount</a>, <a href=#pfmfilemount>PfmFileMount</a>
, and <a href=#pfmmarshaller>PfmMarshaller</a>.
</p>
<h3><a name="arch-cmd"></a>Command Line Interface</a></h3>
<p>
Pismo File Mount includes a command line interface. This
is implemented as the "pfm" command, usable from a command
or terminal prompt. Using pfm it is possible to:
</p>
<ul>
<li>Mount PFM Audit Package support container files.</li>
<li>Unmount mounts.</li>
<li>List mounts.</li>
<li>Register and unregister PFM Audit Package formatters.</li>
<li>Uninstall core PFM files.</li>
<li>Pre-load the PFM kernel module.</li>
</ul>
<p>
The command line interface includes basic help information.
Examples:
</p>
<pre>
>pfm -h
>pfm mount -h
>pfm mount myphotos.zip
>pfm unmount myphotos.zip
</pre>
<h3><a name="arch-install"></a>Installer</a></h3>
<p>
The <a href=#pfmap>PFM Audit Package</a> and 3rd party applications
that incorporate PFM install the core PFM files using the
provided installer "pfminst". Example:
</p>
<pre>
>pfminst install
>pfminst uninstall pfm-license-someapplication.txt
</pre>
<p>
The PFM installer has been designed to reduce points of failure
during install/upgrade/uninstall, to simplify integration with
3rd party applications, and to reduce support costs.
</p>
<ul>
<li>Zero reboots.
<p>
Careful attention to the design of PFM allows it to be installed,
upgraded, and uninstalled, without restarting the system.
</p>
</li>
<li>Self repairing.
<p>
PFM utilizes non state based install and uninstall logic. This
makes fixing corrupted installations as simple as re-running the
installer. The uninstaller can be run regardless of the state of
the install, eliminating need for a separate installation cleanup
tool for support.
</p>
</li>
<li>Multiple client application support.
<p>
Numerous applications that utilize PFM can simultaneously be
installed. Removing one application will not cause files needed by
another application to be removed.
</p>
</li>
<li>Managed forward and backward compatibility.
<p>
Installing a new application will not cause older PFM files to
replace newer files, potentially breaking existing installed
applications. Installing a new application will not remove
optional PFM files that are used by existing installed
applications.
</p>
</li>
</ul>
<h1><a name="pfmap"></a>Pismo File Mount Audit Package</a></h1>
<p>
The Pismo File Mount Audit Package (PFMAP) is a utility
application that utilizes PFM. It allow users to mount the
contents of container files to the filesystem as read-write
or read-only volumes. PFMAP is built using the same PFM
interfaces available to 3rd party application developers.
</p>
<p>
In addition to being a useful stand-alone application,
PFMAP can be used with the PFM Developer Kit by software
developers.
</p>
<h2><a name="pfmap-shx"></a>Explorer shell extension</a></h2>
<p>
PFMAP includes a Windows Explorer shell extension. This shell
extension allows convenient control of PFMAP directly from Explorer.
</p>
<ul>
<li>Files can be mounted and unmounted through
Explorer file and context menus.
</li>
<li>File types are registered, providing icons and
default actions.
</li>
<li>New <a href=#pfmap-pfolder>Private Folder</a> files can be
created through the explorer file/new menu.
</ul>
<h2><a name="pfmap-control"></a>Mount Control</a></h2>
<p>
The Mount Control application, pfmcontrol, is the graphical
user interface to PFMAP. All functionality in PFMAP can be
accessed through this application, independent of explorer or
the PFM command line interface.
</p>
<h2><a name="pfmap-isofs"></a>Formatters</a></h2>
<p>
PFMAP supports a variety of container file formats. Each supported
container format is implemented as a separate "formatter" DLL. When
a container file is mounted, PFMAP locates the matching formatter
DLL and uses it to create a PFM server for exposing the container
file contents.
</p>
<p>
Third party developers can implement new formatters and register
them for use with PFMAP.
</p>
<h2><a name="pfmap-isofs"></a>CD/DVD image file reader</a></h2>
<p>
Pfmisofs.dll is a read-only DVD and CD image file formatter. It
supports all or part of the following formats and extensions:
</p>
<ul>
<li>ISO-9660
</li>
<li>Joliet extensions (Windows Unicode file names)
</li>
<li>UDF 1.02
</li>
<li>ISO image container format
</li>
<li>Compact ISO (CISO) image container format
</li>
<li>Compact File Set (CFS) images
</li>
</ul>
<h2><a name="pfmap-zipfs"></a>Zip reader</a></h2>
<p>
Pfmzipfs is a read-only ZIP archive file formatter. It
supports the following formats and compression modes:
</p>
<ul>
<li>Pkzip 2.0 file format
</li>
<li>64 bit file size extensions
</li>
<li>Deflate compression
</li>
<li>Deflate64 compression
</li>
<li>Bzip2 compression
</li>
<li>Lzma compression
</li>
<li>UTF8 file names
</li>
<li>Unix ZIP file support (non DOS/OEM file names)
</li>
</ul>
<p>
The implementation is missing the following potentially useful
features:
</p>
<ul>
<li>Pkzip 2.0 password protection
</li>
<li>Winzip AES encryption extension
</li>
<li>Pkware encryption extensions
</li>
<li>Non-standard/advanced compression algorithms
(ppmd, wavpack, ...)
</li>
<li>Legacy compression algorithms (shrink, implode, ...)
</ul>
<h2><a name="pfmap-tempfs"></a>RAM file system</a></h2>
<p>
Pfmramfs.dll implements a read-write temporary virtual file
system.
</p>
<p>
The RAM file system stores all file data in system memory.
This limits the maximum amount of stored file data based on
available physical memory and swap file space. On 32 bit
systems the amount of stored file data cannot exceed 2GB due
to limited process address space.
</p>
<h2><a name="pfmap-pfolder"></a>Private Folder file system</a></h2>
<p>
Pfmpfolderfs implements a read, write, encrypted, compressed
container file formatter. It allows storing sensitive files in
a secure container file, accessible only with the correct
password.
</p>
<p>
The user supplied password is converted to an encryption key
using the PKCS5V2 algorithm. Data is encrypted using the AES
encryption algorithm in XTS chaining mode.
</p>
<p>
Data compression uses the Zlib implementation of the deflate
compression format. This is the same compression used in PNG
images and ZIP archives.
</p>
<p>
The Private Folder data format documentation is not yet ready
for public release. Pre-release information will be provided
to interested parties upon request. For more information
contact Pismo Technic Inc. support.
</p>
<h1><a name="kit"></a>PFM Development Kit</a></h1>
<p>
The PFM Development Kit allows developers to build file
systems using PFM. The kit also can be used to integrate
existing PFMAP file systems into 3rd party applications.
</p>
<h2><a name="kit-languages"></a>Programming Languages</a></h2>
<p>
PFM supports development in a variety of programming languges,
including:
</p>
<ul>
<li>C</li>
<li>C++</li>
<li>CLR languages (C#, VB, etc., using .Net or Mono)</li>
<li>Java and other JVM targeting languages</li>
</ul>
<p>
A primary goal with PFM programming language support is to have a
largely similar API across all programming languages. This is to
allow for consistent documentation across all languages, as well
as to allow sharing of support information and documentation
between developers and projects using different programming
languages.
</p>
<p>
A consequence of the PFM API portability is that it is not
customized for each programming language to follow common language
specific practices. As an example, PFM API methods return error
codes for all programming languages, as opposed to throwing
exceptions. Developers are encouraged to wrap the PFM API as they
see fit to make it fit their style of programming.
</p>
<p>
This documentation describes the API using C++ syntax. Developers
using other languages will need to refer to the class, assembly, or
header files, for the syntactic differences.
</p>
<h2><a name="kit-c"></a>C Header Files</a></h2>
<p>
The PFM API is defined in a C header file.
</p>
<ul>
<li><a href="include/pfmapi.h">pfmapi.h</a></li>
</ul>
<p>
The C PFM API linkage is handled using inline code.
Applications do not need to link to any PFM library at build
time, and applications can load on systems where PFM is not
installed.
</p>
<h2><a name="kit-c"></a>C++ Header Files</a></h2>
<p>
The PFM API is defined in a C++ header file.
</p>
<ul>
<li><a href="include/pfmapi.hxx">pfmapi.hxx</a></li>
</ul>
<p>
Note that if you include the C versions of the above header
in C++ code, it will automatically include the C++ version.
</p>
<p>
The C++ PFM API linkage is handled using inline code.
Applications do not need to link to any PFM library at build
time, and applications can load on systems where PFM is not
installed.
</p>
<h2><a name="kit-clr"></a>CLR (C#, VB) API Assembly</a></h2>
<p>
The CLR (C#, VB) PFM API is implemented in a portable assembly
DLL and with a number of platform specific native DLLs. These
files are all located in the "clr" folder in the PFM Developer
Kit. Applications using the CLR PFM API will distribute the API
assembly and DLLs with their application and will not install
them to or load them from a shared location on the system.
</p>
<ul>
<li><a href="clr/pfmclr_190.dll">pfmclr_190.dll</a></li>
<li>win-x64/pfmshim_190.dll</li>
<li>win-x86/pfmshim_190.dll</li>
<li>mac-x64/pfmshim_190.so</li>
<li>mac-x86/pfmshim_190.so</li>
<li>lin-x64/pfmshim_190.dylib</li>
<li>lin-x86/pfmshim_190.dylib</li>
</ul>
<p>
The PFM API assembly is compatible with the Microsoft .NET
runtime on Windows, and with the Mono runtime on Mac and Linux.
</p>
<p>
Though the PFM API assembly and helper libraries are versioned
with a PFM build number, they can be used with any matching or
newer PFM build.
</p>
<h2><a name="kit-java"></a>Java API Jar</a></h2>
<p>
The Java PFM API is implemented in a portable jar file.
</p>
<ul>
<li><a href="java/pfmjvm_190.jar">pfmjvm_190.jar</a></li>
</ul>
<p>
This jar contains all needed classes and JNI libraries for
interfacing with PFM from Java applications. Applications using
the Java PFM API will distribute the API jar with their application
and will not install it to or load it from a shared location on the
system.
</p>
<p>
The Java PFM API is compatible with a variety of JVM implementations
and platforms. It includes the following JNI libraries:
</p>
<ul>
<li>win-x64/pfmjni_190.dll</li>
<li>win-x86/pfmjni_190.dll</li>
<li>mac-x64/pfmjni_190.so</li>
<li>mac-x86/pfmjni_190.so</li>
<li>lin-x64/pfmjni_190.dylib</li>
<li>lin-x86/pfmjni_190.dylib</li>
</ul>
<p>
Though the Java PFM API is versioned with a PFM build number, it can
be used with any matching or newer PFM build.
</p>
<h2><a name="kit-samples"></a>Samples</a></h2>
<h3><a name="sample-unmount"></a>Mounter application in C, C++, C#, and Java</a></h3>
<p>
The mounter sample demonstrates integrating PFMAP formatters into
an application to allow mounting and unmounting container files
such as zip and ISO.
</p>
<ul>
<li><a href="samples/mounter_c/mounter.c">mounter.c</a></li>
<li><a href="samples/mounter_cpp/mounter.cpp">mounter.cpp</a></li>
<li><a href="samples/mounter_cs/mounter.cs">mounter.cs</a></li>
<li><a href="samples/mounter_java/mounter.java">mounter.java</a></li>
</ul>
<h3><a name="sample-hellofs"></a>Hello World file system application in C, C++, C#, and Java</a></h3>
<p>
Hellofs is a very simple virtual file system application. When
run, this application presents a virtual file system containing
a single read-only file, named readme.txt, containing the text
"hello world".
</p>
<ul>
<li><a href="samples/hellofs_c/hellofs.c">hellofs.c</a></li>
<li><a href="samples/hellofs_cpp/hellofs.cpp">hellofs.cpp</a></li>
<li><a href="samples/hellofs_cs/hellofs.cs">hellofs.cs</a></li>
<li><a href="samples/hellofs_java/hellofs.java">hellofs.java</a></li>
</ul>
<h3><a name="sample-tempfs"></a>Temp file system application in C++ and C#</a></h3>
<p>
Tempfs an application that presents a read-write temporary virtual
file system volume. When executed it creates an empty volume in
which new files and folders can be created. All contained data is
discarded when the application exits.
</p>
<ul>
<li><a href="samples/tempfs_cpp/tempfs.cpp">tempfs.cpp</a></li>
<li><a href="samples/tempfs_cs/tempfs.cs">tempfs.cs</a></li>
</ul>
<h1><a name="apidev"></a>Application Development</a></h1>
<p>
The PFM API allows direct integration of PFM with applications.
Integration with PFM allows applications to perform a number of
useful functions.
</p>
<ul>
<li>Mount container files via PFM supplied formatters, either
in-process or out-of-process.</li>
<li>Enumerate, query, and unmount PFM volumes.</li>
<li>Create new mounted volumes exposed through the file system,
using data generated by the application.</li>
</ul>
<h2><a name="appdev-concepts"></a>Concepts</a></h2>
<h3><a name="appdev-errors"></a>Errors</a></h3>
<p>
The PFM API methods return system error codes
such as ERROR_ACCESS_DENIED on Windows or EACCESS
on Mac and Linux.
</p>
<h3><a name="appdev-mountid"></a>Mount ID</a></h3>
<p>
Each time a new mount is created it is assigned a
unique identifier. This identifier is used in the
various interfaces to identify the mount. Mount-ids
are not reused until after the system is restarted.
</p>
<h3><a name="appdev-mountsourcename"></a>Mount Source Name</a></h3>
<p>
Each mount is given an application chosen unique
mount-source-name when it is created. The mount-source-name
is formatted as a file-name or URL, where slashes are
considered special characters.
</p>
<h3><a name="appdev-mountendname"></a>Mount End Name</a></h3>
<p>
For each mount, PFM generates a unique mount-end-name. This
name is the portion of the mount-source-name following the
last slash character, with a number suffix appended when
necessary to make it unique. The mount-end-name is used in
the mount-point and UNC name.
</p>
<h3><a name="appdev-mountpoint"></a>Mount Point</a></h3>
<p>
Each mount is accessible through a mount point created in the
<system-drive>\Volumes folder on Windows, the /Volumes folder on
Mac, and the /media folder on Linux. The mount-end-name is used
as the name of the mount-point.
</p>
<h3><a name="appdev-uncname"></a>Mount UNC Name</a></h3>
<p>
On Windows, each mount is accessible through a UNC name in the
format "\\-\mount-end-name".
</p>
<h3><a name="appdev-changeinstance"></a>Change Instances</a></h3>
<p>
PFM maintains a change-instance count for the mount list
and for each individual mount. Each time mount status
changes the mounts change-instance is incremented. Each time
a mount is created or destroyed the mount list change-instance
is incremented. These change instances are used with
<a href=#pfmapi-mountiterate>PfmApi::MountIterate</a> and
<a href=#pfmmountmonitor-wait>PfmMountMonitor::Wait</a> to allow
applications to efficiently monitor for mount status and mount
list changes.