Menu

New Release around JDBMS_FILESYSTEM

This is it, we now can list OS directory contents from a pure SQL Table, in a relational way. You can then filter directory contents (based on regular exepression), to see files size, Last Modif Date, etc... but also, if requested, the hash you want (crc,...), and also the mimetype (based on file contents). This is the main feature, around the function list_files. Here is the function prototype :

CREATE or replace FUNCTION LIST_FILES (
iDirectory IN NVARCHAR2, -- The full path to the directory you want to list
iMatchStrIngRegExp IN NVARCHAR2 := NULL, -- The regular expression (NOT A WILDCARD) used to get the requested subset of files (NULL means all files).
iJackSumAlgorithm IN NVARCHAR2 := NULL, -- The checksum algorithm (NULL means no hash computing) if you want to compute the hash on the fly (for example crc32), see VW_JACKSUM_ALGOS for complete supported list
iJacksumEncodIng IN NUMBER := 8, -- The checksum (Jacksum separator). See ENCODINGs constants in JDBMS_JACKSUM package.
iJacksumSeparator IN NVARCHAR2 := NULL, -- The checksum separator in case you want specific output format
iJacksumFormat IN NVARCHAR2 := '#CHECKSUM', -- The checkum formatting, eg #CHECKSUM is the one people want (pure checskum in text string), have a look at test_JDBMS_JACKSUM.sql for advanced examples
iJacksumGroupingIndex IN NUMBER := -1, -- See JDBMS_JACKSUM for more informations
iJacksumGroupingSymbol IN NVARCHAR2 := NULL, -- See JDBMS_JACKSUM for more informations
igetMimeType IN NUMBER := 0 -- Tells wether to get or not the Mime Type if the file (from its contents). 1 => Compute MimeType 0 => Do Not compute MimeType
)
RETURN FILES_TYPE_SET PIPELINED
USING FILES_TABLE_IMPL;
/

As always, examples are provided, but the use is very very easy.

I've also added JDBMS_FILESYSTEM functions to extract file name (and path) from an absolute filename (no OS dir privilege required).

All details are provided in documentation as well as screenshots and script examples.
Have fun.

Adrien

Posted by AdrienS 2009-07-14

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.