mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-12-22 17:30:15 +00:00
1 line
51 KiB
C
1 line
51 KiB
C
|
/*
File: MoreFiles.h
Contains: The long lost high-level and FSSpec File Manager functions.
Version: Technology: MoreFiles
Release: 1.5.2
Copyright: <20> 1992-2001 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
/*
You may incorporate this sample code into your applications without
restriction, though the sample code has been provided "AS IS" and the
responsibility for its operation is 100% yours. However, what you are
not permitted to do is to redistribute the source as "DSC Sample Code"
after having made changes. If you're going to re-distribute the source,
we require that you make it clear in the source that the code was
descended from Apple Sample Code, but that you've made changes.
*/
#ifndef __MOREFILES__
#define __MOREFILES__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#include "Optimization.h"
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
/*****************************************************************************/
EXTERN_API( OSErr )
HGetVolParms(
ConstStr255Param volName,
short vRefNum,
GetVolParmsInfoBuffer * volParmsInfo,
long * infoSize);
/*
The HGetVolParms function returns information about the characteristics
of a volume. A result of paramErr usually just means the volume doesn't
support PBHGetVolParms and the feature you were going to check
for isn't available.
volName input: A pointer to the name of a mounted volume
or nil.
vRefNum input: Volume specification.
volParmsInfo input: Pointer to GetVolParmsInfoBuffer where the
volume attributes information is returned.
output: Atributes information.
infoSize input: Size of buffer pointed to by volParmsInfo.
output: Size of data actually returned.
Result Codes
noErr 0 No error
nsvErr -35 Volume not found
paramErr -50 Volume doesn't support this function
__________
Also see the macros for checking attribute bits in MoreFilesExtras.h
*/
/*****************************************************************************/
EXTERN_API( OSErr )
HCreateMinimum(
short vRefNum,
long dirID,
ConstStr255Param fileName);
/*
The HCreateMinimum function creates a new file without attempting to set
the creator and file type of the new file. This function is needed to
create a file in an AppleShare "drop box" where the user can make
changes, but cannot see folder or files.
vRefNum input: Volume specification.
dirID input: Directory ID.
fileName input: The name of the new file.
Result Codes
noErr 0 No error
dirFulErr -33 File directory full
dskFulErr -34 Disk is full
nsvErr -35 No such volume
ioErr -36 I/O error
bdNamErr -37 Bad filename
fnfErr -43 Directory not found or incomplete pathname
wPrErr -44 Hardware volume lock
vLckdErr -46 Software volume lock
dupFNErr -48 Duplicate filename and version
dirNFErrdirNFErr -120 Directory not found or incomplete pathname
afpAccessDenied -5000 User does not have the correct access
afpObjectTypeErr -5025 A directory
|