1 package dbms_dbfs_sfs
2 authid current_user
3 as
4
5
6
7 /*
8 *
9 * Special properties for SFS filesystems.
10 *
11 *
12 * sfs_props_pts:
13 * If specified, the granularity (in seconds) of the update of the
14 * timestamp of the parent directory of a file element being created
15 * or deleted. If the most recent update to the parent directory was
16 * more recent than the specified interval, no changes are made to
17 * the parent---this can lead to 2 types of potential problems: (a)
18 * a slightly inaccurate timestamp and (b) race conditions where one
19 * application is attempting to delete an empty directory and
20 * another application is attempting to create a new file element
21 * inside that directory.
22 *
23 * If the child element is a directory, this property is ignored
24 * since directory creation/deletion involve other changes to the
25 * parent (link counting) that cannot be skipped.
26 *
27 * Use with care and only when it is absolutely clear what
28 * specifying this property means.
29 *
30 *
31 * sfs_props_rootid:
32 * An internally generated and maintained number indicating the
33 * filesystem incarnation (root node ID) at the time of creation or
34 * truncation. **NOTE**: This value should not be used or modified
35 * by anyone except the SFS provider itself.
36 *
37 *
38 * sfs_props_normid:
39 * If specified (as a boolean equivalent), and if the filesystem
40 * uses normalized root node IDs (see "sfs_props_rootid" above), the
41 * SFS provider will attempt to dynamically generate and translate
42 * guids so as to be globally unique.
43 *
44 *
45 * sfs_props_df:
46 * If specified, denotes the type of algorithm used for space usage
47 * computation in a filesystem. Possible values are:
48 *
49 * 'full' (the default) implying a detailed computation that
50 * maps used and free space based on segment bitmaps.
51 *
52 * 'fast' implying a segment-level summary of the total bytes
53 * used (with no "free" space).
54 *
55 * 'none' implying no space usage computation (both "used" and
56 * "free" space denoted as zero).
57 *
58 * Non-default values will result in "df"-like commands executing
59 * very quickly, but will show varying levels of inaccurate data.
60 *
61 *
62 * sfs_props_df_cache:
63 * If specified, the cache lifetime (in seconds) of the space
64 * computation results of the given store. A value <= "0" implies no
65 * caching of the results. If space usage is cached, tools like "df"
66 * will not immediately reflect changes to the filesystem, but the
67 * overall performance of DBFS operations will improve (since
68 * expensive queries are not run as long as the cache is considered
69 * valid).
70 *
71 */
72
73 sfs_props_pts constant varchar2(32) := 'sfs:props:pts';
74 sfs_props_rootid constant varchar2(32) := 'sfs:props:rootid';
75 sfs_props_normid constant varchar2(32) := 'sfs:props:normid';
76 sfs_props_df constant varchar2(32) := 'sfs:props:df';
77 sfs_props_df_cache constant varchar2(32) := 'sfs:props:df_cache';
78
79
80
81 /*
82 * Table/filesystem descriptors:
83 *
84 * A "table_t" is a record that describes a POSIX filesystem table
85 * (in any schema) that is available for use a POSIX store.
86 *
87 * A "filesystem_t" is a record that describes a POSIX filesystem
88 * registered for use by the current user.
89 *
90 * Clients can query this API for the list of available store
91 * tables, determine which ones are suitable for their use, and
92 * register one or more of these tables as stores.
93 *
94 */
95
96 type table_t is record (
97 schema_name varchar2(32),
98 table_name varchar2(32),
99 ptable_name varchar2(32),
100 version# varchar2(32),
101 created timestamp,
102 formatted timestamp,
103 properties dbms_dbfs_content_properties_t
104 );
105 type tables_t is table of table_t;
106
107
108 type volume_t is record (
109 schema_name varchar2(32),
110 table_name varchar2(32),
111 volume_name varchar2(128),
112 created timestamp,
113 from_volume varchar2(128),
114 from_snapshot varchar2(128)
115 );
116 type volumes_t is table of volume_t;
117
118
119 type snapshot_t is record (
120 schema_name varchar2(32),
121 table_name varchar2(32),
122 volume_name varchar2(128),
123 snapshot_name varchar2(128),
124 created timestamp
125 );
126 type snapshots_t is table of snapshot_t;
127
128
129 type filesystem_t is record (
130 store_name varchar2(32),
131 schema_name varchar2(32),
132 table_name varchar2(32),
133 volume_name varchar2(128),
134 snapshot_name varchar2(128),
135 created timestamp
136 );
137 type filesystems_t is table of filesystem_t;
138
139
140
141 /* fastpath types */
142 type dir_entry_t is record (
143 path varchar2(1024), /* dbms_dbfs_content.path_t */
144 item_name varchar2(256), /* dbms_dbfs_content.name_t */
145 st_ino integer,
146 st_mode integer,
147 st_nlink integer,
148 st_uid integer,
149 st_gid integer,
150 st_size integer,
151 st_blksize integer,
152 st_blocks integer,
153 st_atime integer,
154 st_mtime integer,
155 st_ctime integer,
156 st_atimens integer,
157 st_mtimens integer,
158 st_ctimens integer
159 );
160 type dir_entries_t is table of dir_entry_t;
161
162
163 /* table of dbms_dbfs_content.propname_t */
164 type propnames_t is table of varchar2(32);
165
166
167
168 /* dependent segments */
169 type dsegment_t is record (
170 schema varchar2(128),
171 segment_name varchar2(128)
172 );
173 type dsegments_t is table of dsegment_t index by pls_integer;
174
175
176
177 /*
178 * List all available store tables and their properties.
179 *
180 */
181
182 function listTables
183 return tables_t
184 pipelined;
185
186
187 /*
188 * List all volumes available for POSIX store tables.
189 *
190 */
191
192 function listVolumes
193 return volumes_t
194 pipelined;
195
196
197 /*
198 * List all snapshots available for POSIX store tables.
199 *
200 */
201
202 function listSnapshots
203 return snapshots_t
204 pipelined;
205
206
207 /*
208 * List all registered POSIX filesystems.
209 *
210 */
211
212 function listFilesystems
213 return filesystems_t
214 pipelined;
215
216
217
218 /*
219 * Lookup store features (see dbms_dbfs_content.feature_XXX). Lookup
220 * store id.
221 *
222 * A store ID identifies a provider-specific store, across
223 * registrations and mounts, but independent of changes to the store
224 * contents.
225 *
226 * I.e. changes to the store table(s) should be reflected in the
227 * store ID, but re-initialization of the same store table(s) should
228 * preserve the store ID.
229 *
230 * Providers should also return a "version" (either specific to a
231 * provider package, or to an individual store) based on a standard
232 * <a.b.c> naming convention (for <major>, <minor>, and <patch>
233 * components).
234 *
235 */
236
237 function getFeatures(
238 store_name in varchar2)
239 return integer;
240
241 function getStoreId(
242 store_name in varchar2)
243 return number;
244
245 function getVersion(
246 store_name in varchar2)
247 return varchar2;
248
249
250
251 /*
252 * Lookup pathnames by (store_name, std_guid) or (store_mount,
253 * std_guid) tuples.
254 *
255 * If the underlying "std_guid" is found in the underlying store,
256 * this function returns the store-qualified pathname.
257 *
258 * If the "std_guid" is unknown, a "null" value is returned. Clients
259 * are expected to handle this as appropriate.
260 *
261 */
262
263 function getPathByStoreId(
264 store_name in varchar2,
265 guid in integer)
266 return varchar2;
267
268
269
270 /*
271 * to_epoch: timestamp to Unix epoch convertor.
272 * get_epoch: the Unix epoch.
273 *
274 */
275
276 function to_epoch(
277 tv in timestamp)
278 return number
279 deterministic;
280
281 function get_epoch
282 return timestamp
283 deterministic;
284
285
286
287 /*
288 * DBFS SPI: space usage.
289 *
290 * Clients can query filesystem space usage statistics via the
291 * "spaceUsage()" method. Store providers, in turn, are expected to
292 * support at least the "spaceUsage()" method for their stores (and
293 * to make a best effort determination of space usage---esp. if the
294 * store consists of multiple tables/indexes/lobs, etc. scattered
295 * across multiple tablespaces/datafiles/disk-groups, etc.).
296 *
297 * See "dbms_dbfs_content_spi" for more details on the
298 * DBFS-API/provider-SPI contract.
299 *
300 *
301 * "blksize" is the natural tablespace blocksize that holds the
302 * store---if multiple tablespaces with different blocksizes are
303 * used, any valid blocksize is acceptable.
304 *
305 * "tbytes" is the total size of the store in bytes, and "fbytes" is
306 * the free/unused size of the store in bytes. These values are
307 * computed over all segments that comprise the store.
308 *
309 * "nfile", "ndir", "nlink", and "nref" count the number of
310 * currently available files, directories, links, and references in
311 * the store.
312 *
313 * Since database objects are dynamically growable, it is not easy
314 * to estimate the division between "free" space and "used" space.
315 *
316 *
317 * The SPI has 2 space usage methods: "spaceUsage()" and
318 * "spaceUsageFull()". The difference between the two is that the
319 * latter function should implement a "bulk" API---i.e. the ability
320 * to query and aggregate space usage information for all stores
321 * specified as the "propvalue" fields of the "store_names" property
322 * list (the other fields of the property list can be ignored).
323 *
324 * If the SPI does not support the "bulk" aggregation API, the DBFS
325 * API will itself do the necessary iteration and aggregation,
326 * however, at the risk of inaccurate data due to potential
327 * double-counting.
328 *
329 *
330 * In all cases, the DBFS API will invoke the SPI's space usage
331 * functions with only those stores that are managed by the provider
332 * package.
333 *
334 *
335 * If "useEstimate" is specified, providers capable of computing
336 * fast-but-approximate space usage information can make use of this
337 * optimization. Otherwise, the default space usage computation will
338 * be used.
339 *
340 */
341
342 procedure spaceUsage(
343 store_name in varchar2,
344 blksize out integer,
345 tbytes out integer,
346 fbytes out integer,
347 nfile out integer,
348 ndir out integer,
349 nlink out integer,
350 nref out integer);
351
352 procedure spaceUsage(
353 store_name in varchar2,
354 blksize out integer,
355 tbytes out integer,
356 fbytes out integer,
357 nfile out integer,
358 ndir out integer,
359 nlink out integer,
360 nref out integer,
361 useEstimate in integer);
362
363 procedure spaceUsageFull(
364 store_names in dbms_dbfs_content_properties_t,
365 blksize out integer,
366 tbytes out integer,
367 fbytes out integer,
368 nfile out integer,
369 ndir out integer,
370 nlink out integer,
371 nref out integer);
372
373 procedure spaceUsageFull(
374 store_names in dbms_dbfs_content_properties_t,
375 blksize out integer,
376 tbytes out integer,
377 fbytes out integer,
378 nfile out integer,
379 ndir out integer,
380 nlink out integer,
381 nref out integer,
382 useEstimate in integer);
383
384
385
386 /*
387 * Fastpath lookup view support.
388 *
389 * Providers that are willing/able to create a fastpath lookup view
390 * (whose structure conforms to the schema of
391 * "dbms_fuse.dir_entry_t") should define "createGetattrView()" and
392 * "dropGetattrView()" methods, and create/drop the underlying view
393 * as needed.
394 *
395 * The view name should be returned to the caller. The provider is
396 * free to invalidate or drop the view at any time, even without
397 * explicit request, based on its own state.
398 *
399 *
400 * The "recreateGetattrView" is meant for internal-use only during
401 * export/import operations.
402 *
403 *
404 * The procedure executes like a DDL (i.e. auto-commits before and
405 * after its execution).
406 *
407 */
408
409 procedure createGetattrView(
410 store_name in varchar2,
411 ctx in dbms_dbfs_content_context_t,
412 view_name out nocopy varchar2);
413
414 procedure recreateGetattrView(
415 store_name in varchar2,
416 ctx in dbms_dbfs_content_context_t,
417 view_name in varchar2);
418
419 procedure dropGetattrView(
420 store_name in varchar2,
421 view_name in varchar2);
422
423
424
425 /*
426 * DBFS SPI: notes on pathnames.
427 *
431 *
428 * All pathnames used in the SPI are store-qualified, i.e. a 2-tuple
429 * of the form (store_name, pathname) (where the pathname is rooted
430 * within the store namespace).
432 *
433 * Stores/providers that support contentID-based access (see
434 * "feature_content_id") also support a form of addressing that is
435 * not based on pathnames. Items are identified by an explicit store
436 * name, a "null" pathname, and possibly a contentID specified as a
437 * parameter or via the "opt_content_id" property.
438 *
439 * Not all operations are supported with contentID-based access, and
440 * applications should depend only on the simplest create/delete
441 * functionality being available.
442 *
443 */
444
445
446
447 /*
448 * DBFS SPI: creation operations
449 *
450 * The SPI must allow the DBFS API to create directory, file, link,
451 * and reference elements (subject to store feature support).
452 *
453 *
454 * All of the creation methods require a valid pathname (see the
455 * special exemption for contentID-based access below), and can
456 * optionally specify properties to be associated with the pathname
457 * as it is created. It is also possible for clients to fetch-back
458 * item properties after the creation completes (so that
459 * automatically generated properties (e.g. "std_creation_time") are
460 * immediately available to clients (the exact set of properties
461 * fetched back is controlled by the various "prop_xxx" bitmasks in
462 * "prop_flags").
463 *
464 *
465 * Links and references require an additional pathname to associate
466 * with the primary pathname.
467 *
468 * File pathnames can optionally specify a BLOB value to use to
469 * initially populate the underlying file content (the provided BLOB
470 * may be any valid lob: temporary or permanent). On creation, the
471 * underlying lob is returned to the client (if "prop_data" is
472 * specified in "prop_flags").
473 *
474 * Non-directory pathnames require that their parent directory be
475 * created first. Directory pathnames themselves can be recursively
476 * created (i.e. the pathname hierarchy leading up to a directory
477 * can be created in one call).
478 *
479 *
480 * Attempts to create paths that already exist is an error; the one
481 * exception is pathnames that are "soft-deleted" (see below for
482 * delete operations)---in these cases, the soft-deleted item is
483 * implicitly purged, and the new item creation is attempted.
484 *
485 *
486 * Stores/providers that support contentID-based access accept an
487 * explicit store name and a "null" path to create a new element.
488 * The contentID generated for this element is available via the
489 * "opt_content_id" property (contentID-based creation automatically
490 * implies "prop_opt" in "prop_flags").
491 *
492 * The newly created element may also have an internally generated
493 * pathname (if "feature_lazy_path" is not supported) and this path
494 * is available via the "std_canonical_path" property.
495 *
496 * Only file elements are candidates for contentID-based access.
497 *
498 */
499
500 procedure createFile(
501 store_name in varchar2,
502 path in varchar2,
503 properties in out nocopy dbms_dbfs_content_properties_t,
504 content in out nocopy blob,
505 prop_flags in integer,
506 ctx in dbms_dbfs_content_context_t);
507
508 procedure createLink(
509 store_name in varchar2,
510 srcPath in varchar2,
511 dstPath in varchar2,
512 properties in out nocopy dbms_dbfs_content_properties_t,
513 prop_flags in integer,
514 ctx in dbms_dbfs_content_context_t);
515
516 procedure createReference(
517 store_name in varchar2,
518 srcPath in varchar2,
519 dstPath in varchar2,
520 properties in out nocopy dbms_dbfs_content_properties_t,
521 prop_flags in integer,
522 ctx in dbms_dbfs_content_context_t);
523
524 procedure createDirectory(
525 store_name in varchar2,
526 path in varchar2,
527 properties in out nocopy dbms_dbfs_content_properties_t,
528 prop_flags in integer,
529 recurse in integer,
530 ctx in dbms_dbfs_content_context_t);
531
532
533
534 /*
535 * DBFS SPI: deletion operations
536 *
537 * The SPI must allow the DBFS API to delete directory, file, link,
538 * and reference elements (subject to store feature support).
539 *
540 *
541 * By default, the deletions are "permanent" (get rid of the
542 * successfully deleted items on transaction commit), but stores may
543 * also support "soft-delete" features. If requested by the client,
544 * soft-deleted items are retained by the store (but not typically
545 * visible in normal listings or searches).
549 *
546 *
547 * Soft-deleted items can be "restore"d, or explicitly purged.
548 *
550 * Directory pathnames can be recursively deleted (i.e. the pathname
551 * hierarchy below a directory can be deleted in one call).
552 * Non-recursive deletions can be performed only on empty
553 * directories. Recursive soft-deletions apply the soft-delete to
554 * all of the items being deleted.
555 *
556 *
557 * Individual pathnames (or all soft-deleted pathnames under a
558 * directory) can be restored or purged via the restore and purge
559 * methods.
560 *
561 *
562 * Providers that support filtering can use the provider "filter" to
563 * identify subsets of items to delete---this makes most sense for
564 * bulk operations (deleteDirectory, restoreAll, purgeAll), but all
565 * of the deletion-related operations accept a "filter" argument.
566 *
567 *
568 * Stores/providers that support contentID-based access can also
569 * allow file items to be deleted by specifying their contentID.
570 *
571 */
572
573 procedure deleteFile(
574 store_name in varchar2,
575 path in varchar2,
576 filter in varchar2,
577 soft_delete in integer,
578 ctx in dbms_dbfs_content_context_t);
579
580 procedure deleteContent(
581 store_name in varchar2,
582 contentID in raw,
583 filter in varchar2,
584 soft_delete in integer,
585 ctx in dbms_dbfs_content_context_t);
586
587 procedure deleteDirectory(
588 store_name in varchar2,
589 path in varchar2,
590 filter in varchar2,
591 soft_delete in integer,
592 recurse in integer,
593 ctx in dbms_dbfs_content_context_t);
594
595 procedure restorePath(
596 store_name in varchar2,
597 path in varchar2,
598 filter in varchar2,
599 ctx in dbms_dbfs_content_context_t);
600
601 procedure purgePath(
602 store_name in varchar2,
603 path in varchar2,
604 filter in varchar2,
605 ctx in dbms_dbfs_content_context_t);
606
607 procedure restoreAll(
608 store_name in varchar2,
609 path in varchar2,
610 filter in varchar2,
611 ctx in dbms_dbfs_content_context_t);
612
613 procedure purgeAll(
614 store_name in varchar2,
615 path in varchar2,
616 filter in varchar2,
617 ctx in dbms_dbfs_content_context_t);
618
619
620
621 /*
622 * DBFS SPI: path get/put operations.
623 *
624 * Existing path items can be accessed (for query or for update) and
625 * modified via simple get/put methods.
626 *
627 * All pathnames allow their metadata (i.e. properties) to be
628 * read/modified. On completion of the call, the client can request
629 * (via "prop_flags") specific properties to be fetched as well.
630 *
631 * File pathnames allow their data (i.e. content) to be
632 * read/modified. On completion of the call, the client can request
633 * (via the "prop_data" bitmaks in "prop_flags") a new BLOB locator
634 * that can be used to continue data access.
635 *
636 * Files can also be read/written without using BLOB locators, by
637 * explicitly specifying logical offsets/buffer-amounts and a
638 * suitably sized buffer.
639 *
640 *
641 * Update accesses must specify the "forUpdate" flag. Access to link
642 * pathnames can be implicitly and internally dereferenced by stores
643 * (subject to feature support) if the "deref" flag is
644 * specified---however, this is dangerous since symbolic links are
645 * not always resolvable.
646 *
647 *
648 * The read methods (i.e. "getPath" where "forUpdate" is "false"
649 * also accepts a valid "asof" timestamp parameter that can be used
650 * by stores to implement "as of" style flashback queries. Mutating
651 * versions of the "getPath" and the "putPath" methods do not
652 * support as-of modes of operation.
653 *
654 *
655 * "getPathNowait" implies a "forUpdate", and, if implemented (see
656 * "feature_nowait"), allows providers to return an exception
657 * (ORA-54) rather than wait for row locks.
658 *
659 */
660
661 procedure getPath(
662 store_name in varchar2,
663 path in varchar2,
664 properties in out nocopy dbms_dbfs_content_properties_t,
665 content out nocopy blob,
666 item_type out integer,
667 prop_flags in integer,
668 forUpdate in integer,
669 deref in integer,
673 store_name in varchar2,
670 ctx in dbms_dbfs_content_context_t);
671
672 procedure getPathNowait(
674 path in varchar2,
675 properties in out nocopy dbms_dbfs_content_properties_t,
676 content out nocopy blob,
677 item_type out integer,
678 prop_flags in integer,
679 deref in integer,
680 ctx in dbms_dbfs_content_context_t);
681
682 procedure getPath(
683 store_name in varchar2,
684 path in varchar2,
685 properties in out nocopy dbms_dbfs_content_properties_t,
686 amount in out number,
687 offset in number,
688 buffer out nocopy raw,
689 prop_flags in integer,
690 ctx in dbms_dbfs_content_context_t);
691
692 procedure getPath(
693 store_name in varchar2,
694 path in varchar2,
695 properties in out nocopy dbms_dbfs_content_properties_t,
696 amount in out number,
697 offset in number,
698 buffers out nocopy dbms_dbfs_content_raw_t,
699 prop_flags in integer,
700 ctx in dbms_dbfs_content_context_t);
701
702 procedure putPath(
703 store_name in varchar2,
704 path in varchar2,
705 properties in out nocopy dbms_dbfs_content_properties_t,
706 content in out nocopy blob,
707 item_type out integer,
708 prop_flags in integer,
709 ctx in dbms_dbfs_content_context_t);
710
711 procedure putPath(
712 store_name in varchar2,
713 path in varchar2,
714 properties in out nocopy dbms_dbfs_content_properties_t,
715 amount in number,
716 offset in number,
717 buffer in raw,
718 prop_flags in integer,
719 ctx in dbms_dbfs_content_context_t);
720
721 procedure putPath(
722 store_name in varchar2,
723 path in varchar2,
724 properties in out nocopy dbms_dbfs_content_properties_t,
725 written out number,
726 offset in number,
727 buffers in dbms_dbfs_content_raw_t,
728 prop_flags in integer,
729 ctx in dbms_dbfs_content_context_t);
730
731
732
733 /*
734 * DBFS SPI: rename/move operations.
735 *
736 * Pathnames can be renamed or moved, possibly across directory
737 * hierarchies and mount-points, but within the same store.
738 *
739 *
740 * Path renaming functions like the POSIX "rename" syscall while
741 * path moving functions like the POSIX "mv" command.
742 *
743 *
744 * The following table summarizes the behavior of "rename" and
745 * "move".
746 *
747 * -------------------------------------------------------------------------------
748 * operation oldPath newPath behavior
749 * -------------------------------------------------------------------------------
750 * rename non-directory self noop/success
751 * rename non-directory non-existent rename/success
752 * rename non-directory non-directory delete "newPath", rename
753 * rename non-directory directory invalid_arguments exception
754 *
755 * rename directory self noop/success
756 * rename directory non-existent rename/success
757 * rename directory non-directory invalid_arguments exception
758 * rename directory empty directory delete "newPath", rename
759 * rename directory non-empty directory invalid_arguments exception
760 * -------------------------------------------------------------------------------
761 * move non-directory self noop/success
762 * move non-directory non-existent rename/success
763 * move non-directory non-directory delete "newPath", rename
764 * move non-directory directory move "oldPath" into "newPath"
765 * (delete existing non-directory, else invalid_arguments exception)
766 *
767 * move directory self noop/success
768 * move directory non-existent rename/success
769 * move directory non-directory invalid_arguments exception
770 * move directory empty directory move "oldPath" into "newPath"
771 * move directory non-empty directory move "oldPath" into "newPath"
772 * (delete existing empty directory, else invalid_arguments exception)
773 * -------------------------------------------------------------------------------
774 *
775 * Since the semantics of rename/move w.r.t. non-existent/existent
779 *
776 * and non-directory/directory targets is complex, clients may
777 * choose to implement complex renames and moves as a sequence of
778 * simpler moves or copies.
780 *
781 * Stores/providers that support contentID-based access and lazy
782 * pathname binding also support the "setPath" method that
783 * associates an existing "contentID" with a new "path".
784 *
785 */
786
787 procedure renamePath(
788 store_name in varchar2,
789 oldPath in varchar2,
790 newPath in varchar2,
791 properties in out nocopy dbms_dbfs_content_properties_t,
792 ctx in dbms_dbfs_content_context_t);
793
794 procedure movePath(
795 store_name in varchar2,
796 oldPath in varchar2,
797 newPath in varchar2,
798 properties in out nocopy dbms_dbfs_content_properties_t,
799 ctx in dbms_dbfs_content_context_t);
800
801 procedure setPath(
802 store_name in varchar2,
803 contentID in raw,
804 path in varchar2,
805 properties in out nocopy dbms_dbfs_content_properties_t,
806 ctx in dbms_dbfs_content_context_t);
807
808
809
810 /*
811 * DBFS SPI: directory navigation and search.
812 *
813 * The DBFS API can list or search the contents of directory
814 * pathnames, optionally recursing into sub-directories, optionally
815 * seeing soft-deleted items, optionally using flashback "as of" a
816 * provided timestamp, and optionally filtering items in/out within
817 * the store based on list/search predicates.
818 *
819 *
820 * "listCursor" is a highly specialized directory enumerator that is
821 * meant for use with "dbms_fuse" and "dbfs_client" as the ultimate
822 * callers, and with "dbms_dbfs_sfs.listCursor" as the callee.
823 *
824 * Other providers are not expected to implement this method
825 * (dbms_fuse can compensate for this by falling back to using the
826 * generic "list()" method).
827 *
828 */
829
830 function list(
831 store_name in varchar2,
832 path in varchar2,
833 filter in varchar2,
834 recurse in integer,
835 ctx in dbms_dbfs_content_context_t)
836 return dbms_dbfs_content_list_items_t
837 pipelined;
838
839 function listCursor(
840 store_name in varchar2,
841 mnt_prefix in varchar2,
842 path in varchar2,
843 withProps in integer,
844 doSort in integer,
845 doFts in integer,
846 doBulk in integer,
847 ctx in dbms_dbfs_content_context_t)
848 return integer;
849
850 function search(
851 store_name in varchar2,
852 path in varchar2,
853 filter in varchar2,
854 recurse in integer,
855 ctx in dbms_dbfs_content_context_t)
856 return dbms_dbfs_content_list_items_t
857 pipelined;
858
859
860
861 /*
862 * DBFS SPI: locking operations.
863 *
864 * Clients of the DBFS API can apply user-level locks to any valid
865 * pathname (subject to store feature support), associate the lock
866 * with user-data, and subsequently unlock these pathnames.
867 *
868 * The status of locked items is available via various optional
869 * properties (see "opt_lock*" above).
870 *
871 *
872 * It is the responsibility of the store (assuming it supports
873 * user-defined lock checking) to ensure that lock/unlock operations
874 * are performed in a consistent manner.
875 *
876 */
877
878 procedure lockPath(
879 store_name in varchar2,
880 path in varchar2,
881 lock_type in integer,
882 lock_data in varchar2,
883 ctx in dbms_dbfs_content_context_t);
884
885 procedure unlockPath(
886 store_name in varchar2,
887 path in varchar2,
888 ctx in dbms_dbfs_content_context_t);
889
890
891
892 /*
893 * DBFS SPI: access checks.
894 *
895 * Check if a given pathname (store_name, path, pathtype) can be
896 * manipulated by "operation (see the various
897 * "dbms_dbfs_content.op_xxx" opcodes) by "principal".
898 *
899 * This is a convenience function for the DBFS API; a store that
900 * supports access control still internally performs these checks to
901 * guarantee security.
902 *
903 */
904
905 function checkAccess(
909 operation in varchar2,
906 store_name in varchar2,
907 path in varchar2,
908 pathtype in integer,
910 principal in varchar2)
911 return integer;
912
913
914
915 /*
916 * Create and register a new POSIX store.
917 *
918 *
919 * Create a new POSIX store "store_name" in schema "schema_name"
920 * (defaulting to the current schema) as table "tbl_name", with the
921 * table (and internal indexes) in tablespace "tbl_tbs" (defaulting
922 * to the schema's default tablespace), and its lob column in
923 * tablespace "lob_tbs" (defaulting to "tbl_tbs").
924 *
925 * If "tbl_name" is not specified, an internally generated name is
926 * used.
927 *
928 * If "use_bf" is true, a basicfile lob is used, otherwise a
929 * securefile lob is used.
930 *
931 *
932 * "props" is a table of (name, value, typecode) tuples that can be
933 * used to configure the store properties. Currently, no such
934 * properties are defined or used, but the placeholder exists for
935 * future versions of the reference implementation.
936 *
937 *
938 * If the "create_only" argument is "true", the filesystem is
939 * created, but not registered with the current user---a separate
940 * call to "dbms_dbfs_sfs_admin.registerFilesystem" (by the same
941 * users or by other users) is needed to make the filesystem visible
942 * for provider operations.
943 *
944 *
945 * If "use_objects" is true, a single base-table with an object-type
946 * column (using a nested table) is created to back the new
947 * filesystem. Otherwise, a pair of (parent, child) tables is used
948 * to back the filesystem. In any case, the object type nested table
949 * or the child table is used only for user-defined properties.
950 *
951 *
952 * If "with_grants" is true, DML and query access permissions are
953 * granted to the "dbfs_role" as part of creating the filesystem.
954 * Otherwise, explicit grants (or existing permissions) are required
955 * to be able to access the filesystem.
956 *
957 *
958 * All of the remaining arguments to the procedure deal with special
959 * storage options for the file content lobs or to control the
960 * partitioning strategy of the filesystem tables. Settings that do
961 * not apply (to basicfiles or partitioning strategy) will be
962 * silently ignored and coerced to sane values.
963 *
964 * "createStore" is a wrapper around "createFilesystem".
965 *
966 *
967 * The procedure executes like a DDL (i.e. auto-commits before and
968 * after its execution).
969 *
970 */
971
972 -- "compression" parameter
973 compression_default constant varchar2(32) := '';
974 compression_low constant varchar2(32) := 'low';
975 compression_medium constant varchar2(32) := 'medium';
976 compression_high constant varchar2(32) := 'high';
977
978 -- "encryption" parameter
979 encryption_default constant varchar2(32) := '';
980 encryption_3des168 constant varchar2(32) := '3DES168';
981 encryption_aes128 constant varchar2(32) := 'AES128';
982 encryption_aes192 constant varchar2(32) := 'AES192';
983 encryption_aes256 constant varchar2(32) := 'AES256';
984
985 -- "npartitions" parameter
986 default_partitions constant integer := 16;
987
988 -- "partition_key" parameter
989 partition_by_item constant integer := 1;
990 partition_by_path constant integer := 2;
991 partition_by_guid constant integer := 3;
992
993 procedure createFilesystem(
994 store_name in varchar2,
995 schema_name in varchar2 default null,
996 tbl_name in varchar2 default null,
997 tbl_tbs in varchar2 default null,
998 lob_tbs in varchar2 default null,
999 use_bf in boolean default false,
1000 properties in dbms_dbfs_content_properties_t
1001 default null,
1002 create_only in boolean default false,
1003 use_objects in boolean default false,
1004 with_grants in boolean default false,
1005 do_dedup in boolean default false,
1006 do_compress in boolean default false,
1007 compression in varchar2 default compression_default,
1008 do_encrypt in boolean default false,
1009 encryption in varchar2 default encryption_default,
1010 do_partition in boolean default false,
1011 npartitions in number default default_partitions,
1012 partition_key in number default partition_by_item,
1013 partition_guidi in boolean default false,
1014 partition_pathi in boolean default false,
1015 partition_prop in boolean default true);
1016
1017 procedure createStore(
1021 use_bf in boolean default false,
1018 store_name in varchar2,
1019 tbl_name in varchar2 default null,
1020 tbs_name in varchar2 default null,
1022 stgopts in varchar2 default '');
1023
1024
1025
1026 /*
1027 * Export a filesystem (for general cross-schema use) by granting
1028 * suitable permissions to the tables underlying the filesystem to
1029 * the "dbfs_role".
1030 *
1031 * These methods can be successfully invoked only by those users who
1032 * are capable of granting the necessary privileges, i.e. either by
1033 * the users who own the underlying filesystem tables, or
1034 * sufficiently privileged users who can grant access across
1035 * schemas.
1036 *
1037 *
1038 * The procedure executes like a DDL (i.e. auto-commits before and
1039 * after its execution).
1040 *
1041 */
1042
1043 procedure exportTable(
1044 schema_name in varchar2 default null,
1045 tbl_name in varchar2,
1046 toUserRole in varchar2 default 'DBFS_ROLE');
1047
1048 procedure exportFilesystem(
1049 store_name in varchar2,
1050 toUserRole in varchar2 default 'DBFS_ROLE');
1051
1052
1053
1054 /*
1055 * (Re)initialize a POSIX store.
1056 *
1057 *
1058 * The table associated with the POSIX store "store_name" is
1059 * truncated and reinitialized with a single "root" directory entry.
1060 *
1061 *
1062 * The procedure executes like a DDL (i.e. auto-commits before and
1063 * after its execution).
1064 *
1065 */
1066
1067 procedure initFS(
1068 store_name in varchar2);
1069
1070
1071
1072 /*
1073 * Normalize the guid numbering of an existing POSIX store.
1074 *
1075 *
1076 * Lock the tables associated with the store, renumber the
1077 * std_guid/std_parent_guid of the various store elements, and
1078 * modify the store to use normalized numbering (see
1079 * "sfs_props_rootid").
1080 *
1081 * **NOTE**: do not invoke this procedure unless you know exactly
1082 * what you are doing.
1083 *
1084 *
1085 * The procedure executes like a DDL (i.e. auto-commits before and
1086 * after its execution).
1087 *
1088 */
1089
1090 procedure normalizeFS(
1091 store_name in varchar2);
1092 pragma supplemental_log_data(
1093 normalizeFS,
1094 AUTO_WITH_COMMIT);
1095
1096
1097
1098 /*
1099 * Shrink a POSIX store.
1100 *
1101 *
1102 * Logically shrink a POSIX store by releasing space from the
1103 * various segments underlying the store.
1104 *
1105 * The primary benefit of the shrink is expected to come from the
1106 * lob segments in the store (although it is possible in certain
1107 * circumstances---a large number of very small inline lobs---for
1108 * the shrink to benefit by operating on table segments).
1109 *
1110 * By default, the shrink operation attempts to recover space
1111 * unconditionally. However, it is possible to specify either a
1112 * minimum percentage or minimum #bytes reduction before the shrink
1113 * is triggered---these reduction checks are performed only on the
1114 * lob segments underlying the store, and are based on an
1115 * approximate comparison between the size of active lobs vs. size
1116 * of the underlying segments.
1117 *
1118 * If a POSIX store is partitioned, the shrink benefit checks, if
1119 * enabled, are performed on a per-partition basis.
1120 *
1121 *
1122 * If "dryrun" is specified, the store is not modified, but various
1123 * checks and space usage computations are traced (via the DBFS API
1124 * trace).
1125 *
1126 *
1127 * In the case of POSIX stores based on securefiles, shrink requires
1128 * the use of interim tables. These tables are created, by default,
1129 * in the default tablespace corresponding to the user that executes
1130 * the shrink. The "tbs" argument can be used to specify a different
1131 * tablespace (presumably with enough space) to hold any interim
1132 * tables created for the shrink.
1133 *
1134 *
1135 * The procedure executes like a DDL (i.e. auto-commits before and
1136 * after its execution).
1137 *
1138 */
1139
1140 procedure shrinkFS(
1141 store_name in varchar2,
1142 min_pct in number default null,
1143 min_bytes in number default null,
1144 dryrun in boolean default false,
1145 tbs in varchar2 default null);
1146 pragma supplemental_log_data(
1147 shrinkFS,
1148 AUTO_WITH_COMMIT);
1149
1150
1151
1152 /*
1153 * (Online) redefine/reorganize a POSIX store.
1154 *
1155 *
1156 * Redefine/reorganize the logical structure of a POSIX store using
1160 * This procedure internally uses "dbms_redefinition" and on
1157 * another (initially empty) POSIX store as the template for the new
1158 * organization.
1159 *
1161 * completion, swaps the objects underlying the old and new stores,
1162 * as per the semantics of online redefinition.
1163 *
1164 *
1165 * The "srcStore" being reorganized remains available during the
1166 * process.
1167 *
1168 * The "dstStore" being used as the template for reorganization
1169 * should start out empty (but with the desired new logical
1170 * structure). This store should also not be in active use (i.e. no
1171 * ContentAPI registrations or mounts).
1172 *
1173 *
1174 * On completion of the reorganization, both "srcStore" and
1175 * "dstStore" will have a copy of the same logical data, and
1176 * "srcStore" will have the desired new structure.
1177 *
1178 * At this point, "dstStore" can be dropped to clean up space.
1179 *
1180 *
1181 * The reorganization procedure can be used to:
1182 *
1183 * . shrink a store to release space.
1184 * . convert partitioned stores into non-partitioned ones,
1185 * or vice versa.
1186 * . change the compression, encryption, deduplication storage
1187 * properties of the securefiles underlying a store.
1188 * . move a store across tablespaces.
1189 * . and more
1190 *
1191 *
1192 * The only kind of reorganization not currently supported is
1193 * converting a user-properties child table based store to/from a
1194 * nested object-table based store.
1195 *
1196 *
1197 * The procedure executes like a DDL (i.e. auto-commits before and
1198 * after its execution).
1199 *
1200 */
1201
1202 procedure reorganizeFS(
1203 srcStore in varchar2,
1204 dstStore in varchar2);
1205 pragma supplemental_log_data(
1206 reorganizeFS,
1207 AUTO_WITH_COMMIT);
1208
1209
1210
1211 /*
1212 * Modify the properties of a POSIX store.
1213 *
1214 * Add, remove, or set the properties of a POSIX store. Changing
1215 * store properties is best done when there are no users of the
1216 * filesystem (existing users will attempt to reinitialize the
1217 * filesystem state and can behave in surprising and inconsistent
1218 * ways).
1219 *
1220 */
1221
1222 procedure addFSProperties(
1223 store_name in varchar2,
1224 properties in dbms_dbfs_content_properties_t);
1225
1226 procedure deleteFSProperties(
1227 store_name in varchar2,
1228 properties in dbms_dbfs_content_properties_t);
1229
1230 procedure setFSProperties(
1231 store_name in varchar2,
1232 properties in dbms_dbfs_content_properties_t);
1233
1234
1235
1236 /*
1237 * Unregister and drop a POSIX store.
1238 *
1239 *
1240 * If the specified store table is registered by the current user,
1241 * it will be unregistered from the DBFS API and the POSIX metadata
1242 * tables.
1243 *
1244 * Subsequent to unregistration, an attempt will be made to store
1245 * table(s). This operation may fail if other users are currently
1246 * using this store table---in these cases, it is necessary to also
1247 * execute "dbms_dbfs_sfs.dropFilesystem" or
1248 * "dbms_dbfs_sfs_admin.unregisterFilesystem" as these users first
1249 * before the actual store table can be dropped.
1250 *
1251 * Finally, the user attempting a drop of the tables underlying the
1252 * store must actually have the privileges to complete the drop
1253 * operation (either as the owner of the tables, or as a
1254 * sufficiently privileged user for cross-schema operations).
1255 *
1256 *
1257 * The procedure executes like a DDL (i.e. auto-commits before and
1258 * after its execution).
1259 *
1260 */
1261
1262 procedure dropFilesystem(
1263 schema_name in varchar2 default null,
1264 tbl_name in varchar2);
1265
1266 procedure dropFilesystem(
1267 store_name in varchar2);
1268
1269
1270
1271 /*
1272 * Drop orphaned POSIX stores.
1273 *
1274 *
1275 * An "orphaned" POSIX store is one that is (a) empty of user-data,
1276 * (b) not referred to in any of the DBFS/SFS metadata tables, and
1277 * (c) conforming to the structure and signature of an SFS-managed
1278 * table.
1279 *
1280 * Such orphans are most likely left over from past failed and
1281 * incompletely cleaned up filesystem operations.
1282 *
1283 * This procedure will cleanup such orphans by first cleaning up
1284 * orphaned metadata, and then dropping the orphaned tables.
1285 *
1286 *
1287 * By default, only orphans in the current session_user's schema
1288 * will be cleaned up. It is possible to explicitly specify a
1289 * "schema_name" to invoke cleanup in other schemas, and to also
1290 * explicitly specify a "table_name" to test-and-cleanup a single
1294 *
1291 * orphan.
1292 *
1293 * **NOTE**: Use this procedure with care.
1295 *
1296 * The procedure executes like a DDL (i.e. auto-commits before and
1297 * after its execution).
1298 *
1299 */
1300
1301 procedure cleanupOrphans(
1302 schema_name in varchar2 default null,
1303 table_name in varchar2 default null);
1304
1305
1306
1307 /*
1308 * Snapshot operations.
1309 *
1310 * All snapshot operations must specify a valid store name
1311 * "store_name" and a valid snapshot name "snap_name". Additionally,
1312 * the methods accept a volume name "vol_name" (which may be "null"
1313 * or defaulted to "main"---these refer to the primary volume);
1314 * non-default volumes are not currently supported.
1315 *
1316 * Since "snap_name" may be used as a pathname component, it should
1317 * conform to the standard rules about such names (i.e. no embedded
1318 * "/" characters).
1319 *
1320 * All operations also accept a "do_wait" parameter (default "true")
1321 * which controls whether the invoking session waits for other
1322 * active transactions to finish, or if it exits immediately if the
1323 * specified operation cannot be initiated.
1324 *
1325 * All operations execute like DDL (i.e. auto-commit before and
1326 * after their execution).
1327 *
1328 *
1329 * "createSnapshot" creates a new snapshot on the specified
1330 * store/volume.
1331 *
1332 * "revertSnapshot" drops all snapshots/changes in the specified
1333 * store/volume more recent than the specified snapshot.
1334 *
1335 * "dropSnapshot" drops the specified snapshot from the specified
1336 * store/volume.
1337 *
1338 */
1339
1340 procedure createSnapshot(
1341 store_name in varchar2,
1342 snap_name in varchar2,
1343 vol_name in varchar2 default 'main',
1344 do_wait in boolean default true);
1345
1346 procedure revertSnapshot(
1347 store_name in varchar2,
1348 snap_name in varchar2,
1349 vol_name in varchar2 default 'main',
1350 do_wait in boolean default true);
1351
1352 procedure dropSnapshot(
1353 store_name in varchar2,
1354 snap_name in varchar2,
1355 vol_name in varchar2 default 'main',
1356 do_wait in boolean default true,
1357 recurse in boolean default false);
1358
1359
1360
1361 /*
1362 * Filesystem/store operations.
1363 *
1364 * Filesystem operations are used to map a (schema, table, volume,
1365 * snapshot) tuple to a filesystem (aka store) name. A filesystem is
1366 * accessible via the DBFS API as a store/mount.
1367 *
1368 *
1369 * The procedure executes like a DDL (i.e. auto-commits before and
1370 * after its execution).
1371 *
1372 */
1373
1374 procedure registerFilesystem(
1375 store_name in varchar2,
1376 schema_name in varchar2,
1377 tbl_name in varchar2,
1378 vol_name in varchar2 default 'main',
1379 snap_name in varchar2 default null);
1380
1381 procedure unregisterFilesystem(
1382 store_name in varchar2);
1383
1384
1385
1386 /*
1387 * Fastpath operations for dbms_fuse/dbfs_client only.
1388 *
1389 * DO NOT USE DIRECTLY.
1390 *
1391 */
1392
1393 function fs_getattr(
1394 store in varchar2,
1395 mount in varchar2,
1396 ctx in dbms_dbfs_content_context_t,
1397 path in varchar2,
1398 st_ino out integer,
1399 st_mode out integer,
1400 st_nlink out integer,
1401 st_uid out integer,
1402 st_gid out integer,
1403 st_size out integer,
1404 st_blksize out integer,
1405 st_blocks out integer,
1406 st_atime out integer,
1407 st_mtime out integer,
1408 st_ctime out integer,
1409 st_atimens out integer,
1410 st_mtimens out integer,
1411 st_ctimens out integer)
1412 return integer;
1413
1414 function fs_readlink(
1415 store in varchar2,
1416 mount in varchar2,
1417 ctx in dbms_dbfs_content_context_t,
1418 path in varchar2,
1419 link out nocopy varchar2)
1420 return integer;
1421
1422 function fs_mknod(
1423 store in varchar2,
1424 mount in varchar2,
1425 ctx in dbms_dbfs_content_context_t,
1429 st_gid in integer)
1426 path in varchar2,
1427 st_mode in integer,
1428 st_uid in integer,
1430 return integer;
1431
1432 function fs_mknod(
1433 store in varchar2,
1434 mount in varchar2,
1435 ctx in dbms_dbfs_content_context_t,
1436 path in varchar2,
1437 st_mode in integer,
1438 st_uid in integer,
1439 st_gid in integer,
1440 ret_ino out integer,
1441 ret_mode out integer,
1442 ret_nlink out integer,
1443 ret_uid out integer,
1444 ret_gid out integer,
1445 ret_size out integer,
1446 ret_blksize out integer,
1447 ret_blocks out integer,
1448 ret_atime out integer,
1449 ret_mtime out integer,
1450 ret_ctime out integer,
1451 ret_atimens out integer,
1452 ret_mtimens out integer,
1453 ret_ctimens out integer)
1454 return integer;
1455
1456 function fs_mkdir(
1457 store in varchar2,
1458 mount in varchar2,
1459 ctx in dbms_dbfs_content_context_t,
1460 path in varchar2,
1461 st_mode in integer,
1462 st_uid in integer,
1463 st_gid in integer)
1464 return integer;
1465
1466 function fs_mkdir(
1467 store in varchar2,
1468 mount in varchar2,
1469 ctx in dbms_dbfs_content_context_t,
1470 path in varchar2,
1471 st_mode in integer,
1472 st_uid in integer,
1473 st_gid in integer,
1474 ret_ino out integer,
1475 ret_mode out integer,
1476 ret_nlink out integer,
1477 ret_uid out integer,
1478 ret_gid out integer,
1479 ret_size out integer,
1480 ret_blksize out integer,
1481 ret_blocks out integer,
1482 ret_atime out integer,
1483 ret_mtime out integer,
1484 ret_ctime out integer,
1485 ret_atimens out integer,
1486 ret_mtimens out integer,
1487 ret_ctimens out integer)
1488 return integer;
1489
1490 function fs_unlink(
1491 store in varchar2,
1492 mount in varchar2,
1493 ctx in dbms_dbfs_content_context_t,
1494 path in varchar2)
1495 return integer;
1496
1497 function fs_rmdir(
1498 store in varchar2,
1499 mount in varchar2,
1500 ctx in dbms_dbfs_content_context_t,
1501 path in varchar2)
1502 return integer;
1503
1504 function fs_symlink(
1505 store in varchar2,
1506 mount in varchar2,
1507 ctx in dbms_dbfs_content_context_t,
1508 path in varchar2,
1509 link in varchar2,
1510 st_uid in integer,
1511 st_gid in integer)
1512 return integer;
1513
1514 function fs_symlink(
1515 store in varchar2,
1516 mount in varchar2,
1517 ctx in dbms_dbfs_content_context_t,
1518 path in varchar2,
1519 link in varchar2,
1520 st_uid in integer,
1521 st_gid in integer,
1522 ret_ino out integer,
1523 ret_mode out integer,
1524 ret_nlink out integer,
1525 ret_uid out integer,
1526 ret_gid out integer,
1527 ret_size out integer,
1528 ret_blksize out integer,
1529 ret_blocks out integer,
1530 ret_atime out integer,
1531 ret_mtime out integer,
1532 ret_ctime out integer,
1533 ret_atimens out integer,
1534 ret_mtimens out integer,
1535 ret_ctimens out integer)
1536 return integer;
1537
1538 function fs_rename(
1539 store in varchar2,
1540 mount in varchar2,
1544 return integer;
1541 ctx in dbms_dbfs_content_context_t,
1542 opath in varchar2,
1543 npath in varchar2)
1545
1546 function fs_link(
1547 store in varchar2,
1548 mount in varchar2,
1549 ctx in dbms_dbfs_content_context_t,
1550 path in varchar2,
1551 link in varchar2,
1552 st_uid in integer,
1553 st_gid in integer)
1554 return integer;
1555
1556 function fs_link(
1557 store in varchar2,
1558 mount in varchar2,
1559 ctx in dbms_dbfs_content_context_t,
1560 path in varchar2,
1561 link in varchar2,
1562 st_uid in integer,
1563 st_gid in integer,
1564 ret_ino out integer,
1565 ret_mode out integer,
1566 ret_nlink out integer,
1567 ret_uid out integer,
1568 ret_gid out integer,
1569 ret_size out integer,
1570 ret_blksize out integer,
1571 ret_blocks out integer,
1572 ret_atime out integer,
1573 ret_mtime out integer,
1574 ret_ctime out integer,
1575 ret_atimens out integer,
1576 ret_mtimens out integer,
1577 ret_ctimens out integer)
1578 return integer;
1579
1580 function fs_chmod(
1581 store in varchar2,
1582 mount in varchar2,
1583 ctx in dbms_dbfs_content_context_t,
1584 path in varchar2,
1585 st_mode in integer)
1586 return integer;
1587
1588 function fs_chmod(
1589 store in varchar2,
1590 mount in varchar2,
1591 ctx in dbms_dbfs_content_context_t,
1592 path in varchar2,
1593 st_mode in integer,
1594 ret_ino out integer,
1595 ret_mode out integer,
1596 ret_nlink out integer,
1597 ret_uid out integer,
1598 ret_gid out integer,
1599 ret_size out integer,
1600 ret_blksize out integer,
1601 ret_blocks out integer,
1602 ret_atime out integer,
1603 ret_mtime out integer,
1604 ret_ctime out integer,
1605 ret_atimens out integer,
1606 ret_mtimens out integer,
1607 ret_ctimens out integer)
1608 return integer;
1609
1610 function fs_chown(
1611 store in varchar2,
1612 mount in varchar2,
1613 ctx in dbms_dbfs_content_context_t,
1614 path in varchar2,
1615 st_uid in integer,
1616 st_gid in integer)
1617 return integer;
1618
1619 function fs_chown(
1620 store in varchar2,
1621 mount in varchar2,
1622 ctx in dbms_dbfs_content_context_t,
1623 path in varchar2,
1624 st_uid in integer,
1625 st_gid in integer,
1626 ret_ino out integer,
1627 ret_mode out integer,
1628 ret_nlink out integer,
1629 ret_uid out integer,
1630 ret_gid out integer,
1631 ret_size out integer,
1632 ret_blksize out integer,
1633 ret_blocks out integer,
1634 ret_atime out integer,
1635 ret_mtime out integer,
1636 ret_ctime out integer,
1637 ret_atimens out integer,
1638 ret_mtimens out integer,
1639 ret_ctimens out integer)
1640 return integer;
1641
1642 function fs_truncate(
1643 store in varchar2,
1644 mount in varchar2,
1645 ctx in dbms_dbfs_content_context_t,
1646 path in varchar2,
1647 newlen in number)
1648 return integer;
1649
1650 function fs_truncate(
1651 store in varchar2,
1652 mount in varchar2,
1653 ctx in dbms_dbfs_content_context_t,
1654 path in varchar2,
1658 ret_nlink out integer,
1655 newlen in number,
1656 ret_ino out integer,
1657 ret_mode out integer,
1659 ret_uid out integer,
1660 ret_gid out integer,
1661 ret_size out integer,
1662 ret_blksize out integer,
1663 ret_blocks out integer,
1664 ret_atime out integer,
1665 ret_mtime out integer,
1666 ret_ctime out integer,
1667 ret_atimens out integer,
1668 ret_mtimens out integer,
1669 ret_ctimens out integer)
1670 return integer;
1671
1672 function fs_utime(
1673 store in varchar2,
1674 mount in varchar2,
1675 ctx in dbms_dbfs_content_context_t,
1676 path in varchar2,
1677 atime in integer,
1678 mtime in integer,
1679 atimens in integer,
1680 mtimens in integer)
1681 return integer;
1682
1683 function fs_utime(
1684 store in varchar2,
1685 mount in varchar2,
1686 ctx in dbms_dbfs_content_context_t,
1687 path in varchar2,
1688 atime in integer,
1689 mtime in integer,
1690 atimens in integer,
1691 mtimens in integer,
1692 ret_ino out integer,
1693 ret_mode out integer,
1694 ret_nlink out integer,
1695 ret_uid out integer,
1696 ret_gid out integer,
1697 ret_size out integer,
1698 ret_blksize out integer,
1699 ret_blocks out integer,
1700 ret_atime out integer,
1701 ret_mtime out integer,
1702 ret_ctime out integer,
1703 ret_atimens out integer,
1704 ret_mtimens out integer,
1705 ret_ctimens out integer)
1706 return integer;
1707
1708 function fs_open(
1709 store in varchar2,
1710 mount in varchar2,
1711 ctx in dbms_dbfs_content_context_t,
1712 path in varchar2,
1713 content out nocopy blob,
1714 forWrite in integer)
1715 return integer;
1716
1717 function fs_open(
1718 store in varchar2,
1719 mount in varchar2,
1720 ctx in dbms_dbfs_content_context_t,
1721 path in varchar2,
1722 content out nocopy blob,
1723 forWrite in integer,
1724 ret_ino out integer,
1725 ret_mode out integer,
1726 ret_nlink out integer,
1727 ret_uid out integer,
1728 ret_gid out integer,
1729 ret_size out integer,
1730 ret_blksize out integer,
1731 ret_blocks out integer,
1732 ret_atime out integer,
1733 ret_mtime out integer,
1734 ret_ctime out integer,
1735 ret_atimens out integer,
1736 ret_mtimens out integer,
1737 ret_ctimens out integer)
1738 return integer;
1739
1740 function fs_read(
1741 store in varchar2,
1742 mount in varchar2,
1743 ctx in dbms_dbfs_content_context_t,
1744 path in varchar2,
1745 buffer out nocopy raw,
1746 amount in integer,
1747 offset0 in integer)
1748 return integer;
1749
1750 function fs_read(
1751 store in varchar2,
1752 mount in varchar2,
1753 ctx in dbms_dbfs_content_context_t,
1754 path in varchar2,
1755 amount in integer,
1756 offset0 in integer,
1757 buffers out nocopy dbms_dbfs_content_raw_t)
1758 return integer;
1759
1760 function fs_write(
1761 store in varchar2,
1762 mount in varchar2,
1763 ctx in dbms_dbfs_content_context_t,
1764 path in varchar2,
1765 buffer in raw,
1766 amount in integer,
1767 offset0 in integer)
1768 return integer;
1769
1773 ctx in dbms_dbfs_content_context_t,
1770 function fs_write(
1771 store in varchar2,
1772 mount in varchar2,
1774 path in varchar2,
1775 buffer in raw,
1776 amount in integer,
1777 offset0 in integer,
1778 ret_ino out integer,
1779 ret_mode out integer,
1780 ret_nlink out integer,
1781 ret_uid out integer,
1782 ret_gid out integer,
1783 ret_size out integer,
1784 ret_blksize out integer,
1785 ret_blocks out integer,
1786 ret_atime out integer,
1787 ret_mtime out integer,
1788 ret_ctime out integer,
1789 ret_atimens out integer,
1790 ret_mtimens out integer,
1791 ret_ctimens out integer)
1792 return integer;
1793
1794 function fs_write(
1795 store in varchar2,
1796 mount in varchar2,
1797 ctx in dbms_dbfs_content_context_t,
1798 path in varchar2,
1799 offset0 in integer,
1800 buffers in dbms_dbfs_content_raw_t)
1801 return integer;
1802
1803 function fs_write(
1804 store in varchar2,
1805 mount in varchar2,
1806 ctx in dbms_dbfs_content_context_t,
1807 path in varchar2,
1808 offset0 in integer,
1809 buffers in dbms_dbfs_content_raw_t,
1810 ret_ino out integer,
1811 ret_mode out integer,
1812 ret_nlink out integer,
1813 ret_uid out integer,
1814 ret_gid out integer,
1815 ret_size out integer,
1816 ret_blksize out integer,
1817 ret_blocks out integer,
1818 ret_atime out integer,
1819 ret_mtime out integer,
1820 ret_ctime out integer,
1821 ret_atimens out integer,
1822 ret_mtimens out integer,
1823 ret_ctimens out integer)
1824 return integer;
1825
1826 function fs_statfs(
1827 store in varchar2,
1828 mount in varchar2,
1829 ctx in dbms_dbfs_content_context_t,
1830 path in varchar2,
1831 f_bsize out integer,
1832 f_frsize out integer,
1833 f_blocks out integer,
1834 f_bfree out integer,
1835 f_bavail out integer,
1836 f_files out integer,
1837 f_ffree out integer,
1838 f_favail out integer,
1839 f_fsid out integer,
1840 f_flag out integer,
1841 f_namemax out integer)
1842 return integer;
1843
1844 function fs_flush(
1845 store in varchar2,
1846 mount in varchar2,
1847 ctx in dbms_dbfs_content_context_t,
1848 path in varchar2)
1849 return integer;
1850
1851 function fs_release(
1852 store in varchar2,
1853 mount in varchar2,
1854 ctx in dbms_dbfs_content_context_t,
1855 path in varchar2)
1856 return integer;
1857
1858 function fs_fsync(
1859 store in varchar2,
1860 mount in varchar2,
1861 ctx in dbms_dbfs_content_context_t,
1862 path in varchar2)
1863 return integer;
1864
1865 function fs_setxattr(
1866 store in varchar2,
1867 mount in varchar2,
1868 ctx in dbms_dbfs_content_context_t,
1869 path in varchar2,
1870 xname in varchar2,
1871 xvalue in raw,
1872 xflags in integer)
1873 return integer;
1874
1875 function fs_getxattr(
1876 store in varchar2,
1877 mount in varchar2,
1878 ctx in dbms_dbfs_content_context_t,
1879 path in varchar2,
1880 xname in varchar2,
1884 function fs_listxattr(
1881 xvalue out nocopy raw)
1882 return integer;
1883
1885 store in varchar2,
1886 mount in varchar2,
1887 ctx in dbms_dbfs_content_context_t,
1888 path in varchar2)
1889 return propnames_t
1890 pipelined;
1891
1892 function fs_removexattr(
1893 store in varchar2,
1894 mount in varchar2,
1895 ctx in dbms_dbfs_content_context_t,
1896 path in varchar2,
1897 xname in varchar2)
1898 return integer;
1899
1900 function fs_opendir(
1901 store in varchar2,
1902 mount in varchar2,
1903 ctx in dbms_dbfs_content_context_t,
1904 path in varchar2)
1905 return integer;
1906
1907 function fs_readdir(
1908 store in varchar2,
1909 mount in varchar2,
1910 ctx in dbms_dbfs_content_context_t,
1911 path in varchar2,
1912 withProps in integer,
1913 doCursor in integer,
1914 doSort in integer,
1915 doFts in integer,
1916 doBulk in integer,
1917 doFallback in integer)
1918 return dir_entries_t
1919 pipelined;
1920
1921 function fs_releasedir(
1922 store in varchar2,
1923 mount in varchar2,
1924 ctx in dbms_dbfs_content_context_t,
1925 path in varchar2)
1926 return integer;
1927
1928 function fs_fsyncdir(
1929 store in varchar2,
1930 mount in varchar2,
1931 ctx in dbms_dbfs_content_context_t,
1932 path in varchar2)
1933 return integer;
1934
1935 function fs_init
1936 return integer;
1937
1938 function fs_destroy
1939 return integer;
1940
1941 function fs_access(
1942 store in varchar2,
1943 mount in varchar2,
1944 ctx in dbms_dbfs_content_context_t,
1945 path in varchar2,
1946 st_mode in integer)
1947 return integer;
1948
1949 function fs_creat(
1950 store in varchar2,
1951 mount in varchar2,
1952 ctx in dbms_dbfs_content_context_t,
1953 path in varchar2,
1954 st_mode in integer,
1955 content out nocopy blob,
1956 st_uid in integer,
1957 st_gid in integer)
1958 return integer;
1959
1960 function fs_creat(
1961 store in varchar2,
1962 mount in varchar2,
1963 ctx in dbms_dbfs_content_context_t,
1964 path in varchar2,
1965 st_mode in integer,
1966 content out nocopy blob,
1967 st_uid in integer,
1968 st_gid in integer,
1969 ret_ino out integer,
1970 ret_mode out integer,
1971 ret_nlink out integer,
1972 ret_uid out integer,
1973 ret_gid out integer,
1974 ret_size out integer,
1975 ret_blksize out integer,
1976 ret_blocks out integer,
1977 ret_atime out integer,
1978 ret_mtime out integer,
1979 ret_ctime out integer,
1980 ret_atimens out integer,
1981 ret_mtimens out integer,
1982 ret_ctimens out integer)
1983 return integer;
1984
1985 function fs_ftruncate(
1986 store in varchar2,
1987 mount in varchar2,
1988 ctx in dbms_dbfs_content_context_t,
1989 path in varchar2,
1990 newlen in integer,
1991 content in out nocopy blob)
1992 return integer;
1993
1994 function fs_fgetattr(
1995 store in varchar2,
1996 mount in varchar2,
1997 ctx in dbms_dbfs_content_context_t,
1998 path in varchar2,
1999 st_ino out integer,
2000 st_mode out integer,
2001 st_nlink out integer,
2002 st_uid out integer,
2006 st_blocks out integer,
2003 st_gid out integer,
2004 st_size out integer,
2005 st_blksize out integer,
2007 st_atime out integer,
2008 st_mtime out integer,
2009 st_ctime out integer,
2010 st_atimens out integer,
2011 st_mtimens out integer,
2012 st_ctimens out integer)
2013 return integer;
2014
2015
2016
2017 end;