Mac-Carbon
view release on metacpan or search on metacpan
MoreFiles/MF.xs view on Meta::CPAN
RETVAL
=item FSpDirectoryCopy SRCSPEC, DSTSPEC, PREFLIGHT, [COPYERRHANDLER]
Make a copy of a directory structure in a new location.
The FSpDirectoryCopy function makes a copy of a directory structure in a
new location. COPYERRHANDLER is the Perl routine name to handle an
error, should one arise. It will be called as:
$bailout = &$COPYERRHANDLER(ERRORCODE,OPERATION,SRCSPEC,DSTSPEC);
=cut
MacOSRet
FSpDirectoryCopy(srcSpec, dstSpec, preflight, copyErrHandler = NULL)
FSSpec &srcSpec
FSSpec &dstSpec
Boolean preflight
SV * copyErrHandler
CODE:
gMFProc = copyErrHandler;
RETVAL = FSpDirectoryCopy(&srcSpec, &dstSpec, nil, nil, 0, preflight, MFErrHdlr);
OUTPUT:
RETVAL
=item FSpIterateDirectory SPEC, MAXLEVELS, ITERATEFILTER, YOURDATAPTR
Iterate (scan) through a directory's content.
The FSpIterateDirectory function performs a recursive iteration (scan)
of the specified directory and calls your ITERATEFILTER function once
for each file and directory found.
The MAXLEVELS parameter lets you control how deep the recursion goes.
If MAXLEVELS is 1, FSpIterateDirectory only scans the specified directory;
if MAXLEVELS is 2, FSpIterateDirectory scans the specified directory and
one subdirectory below the specified directory; etc. Set MAXLEVELS to
zero to scan all levels.
The YOURDATAPTR parameter can point to whatever data structure you might
want to access from within the ITERATEFILTER. Your filter function will be
called as:
$quit = &$filterFunction(YOURDATAPTR, SPEC);
=cut
MacOSRet
FSpIterateDirectory(spec, maxLevels, iterateFilter, yourDataPtr)
FSSpec &spec
unsigned short maxLevels
SV * iterateFilter
SV * yourDataPtr
CODE:
gMFProc = iterateFilter;
RETVAL = FSpIterateDirectory(&spec, maxLevels, (IterateFilterProcPtr)MFIterateFilter, yourDataPtr);
OUTPUT:
RETVAL
=item FSpDTGetAPPL VOLUME, CREATOR
The FSpDTGetAPPL function finds an application (file type 'APPL') with
the specified CREATOR on the specified VOLUME. It first tries to get
the application mapping from the desktop database. If that fails, then
it tries to find an application with the specified creator using
the File Manager's CatSearch() routine. If that fails, then it tries to
find an application in the Desktop file.
Returns FSSpec or C<undef> on failure.
=cut
FSSpec
FSpDTGetAPPL(volume, creator)
SV * volume
OSType creator
PREINIT:
StringPtr vName = nil;
Str63 volName;
short vRefNum;
STRLEN len;
char * vol;
CODE:
vol = SvPV(volume, len);
if (len && vol[len-1] == ':')
MacPerl_CopyC2P(vol, (vName = volName));
else
vRefNum = SvIV(volume);
if (gMacPerl_OSErr = FSpDTGetAPPL(vName, vRefNum, creator, &RETVAL)) {
XSRETURN_UNDEF;
}
OUTPUT:
RETVAL
=item FSpDTSetComment SPEC, COMMENT
The FSpDTSetComment function sets a file or directory's Finder comment
field. The volume must support the Desktop Manager because you only
have read access to the Desktop file.
=cut
MacOSRet
FSpDTSetComment(spec, comment)
FSSpec &spec
Str255 comment
=item FSpDTGetComment SPEC
The FSpDTGetComment function gets a file or directory's Finder comment
field (if any) from the Desktop Manager or if the Desktop Manager is
not available, from the Finder's Desktop file.
Returns Str255, or C<undef> on failure.
=cut
Str255
FSpDTGetComment(spec)
FSSpec &spec
CODE:
if (gMacPerl_OSErr = FSpDTGetComment(&spec, RETVAL)) {
XSRETURN_UNDEF;
}
OUTPUT:
RETVAL
=item FSpDTCopyComment SRCSPEC, DSTSPEC
The FSpDTCopyComment function copies the desktop database comment from
the source to the destination object. Both the source and the
destination volumes must support the Desktop Manager.
=cut
MacOSRet
FSpDTCopyComment(srcSpec, dstSpec)
FSSpec &srcSpec
FSSpec &dstSpec
=back
=cut
( run in 0.430 second using v1.01-cache-2.11-cpan-140bd7fdf52 )