Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Please Vote! Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

# SFiles

  Routines for working with files.

[ Mac | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

## Quick Index

  DESCRIPTION

## Class Summary

class SFiles
{
public:

  static ErrCode fullPathNameToSpec( const CStr *csFullPath, CFSpec *theSpecP );
  static ErrCode specToFullPathName( const CFSpec *theSpec, short *len, Handle *hFullPath );
  static ErrCode getContainer( const CFSpec *theSpec, long *contParID, StringPtr contName );
  static ErrCode setColorCoding( const CFSpec *theSpec, long newCoding );
  static ErrCode getFinderInfo( const CFSpec *theSpec, long *creator, long *type, long *flags, long *attribs );
  static ErrCode setCreatorAndType( const CFSpec *theSpec, long creator, long type, long flags, long attributes );
  static ErrCode setFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );
  static ErrCode verifyFile( const CFSpec *theSpec );
  static ErrCode getFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );
  static ErrCode setFinderFlags( const CFSpec *theSpec, unsigned short firstAnd, unsigned short thenOr );
  static ErrCode getForkSizes( const CFSpec *theSpec, UnsignedWide *dataLen, UnsignedWide *rsrcLen );
  static ErrCode renameFile( const CFSpec *theSpec, const CStr *csNewName, StringPtr outName, long outNameLen );
  static ErrCode updateContainer( const CFSpec *containedSpec );
  static ErrCode getRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );
  static ErrCode setRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );
  static ErrCode setForkLength( long flags, long whichFork, CFSpec *theSpec, UnsignedWide newLen );

protected:

}; // SFiles

Back to the top of SFiles

### DESCRIPTION

Routines for working with files.

Back to the top of SFiles

### ErrCode fullPathNameToSpec( const CStr *csFullPath, CFSpec *theSpecP );

Convert an MRJ full path to a CFSpec. An MRJ path is like: "/Macintosh%20HD/Photoshop%AC"

    	static	ErrCode fullPathNameToSpec( const CStr *csFullPath, CFSpec *theSpecP );

Back to the top of SFiles

### ErrCode specToFullPathName( const CFSpec *theSpec, short *len, Handle *hFullPath );

Convert a CFSpec to an MRJ full path. See the preceding routine.

    	static	ErrCode specToFullPathName( const CFSpec *theSpec, short *len, Handle *hFullPath );

Back to the top of SFiles

### ErrCode getContainer( const CFSpec *theSpec, long *contParID, StringPtr contName );

Get the parID and name of the CFSpec's parent.

    	static	ErrCode getContainer( const CFSpec *theSpec, long *contParID, StringPtr contName );

Back to the top of SFiles

### ErrCode setColorCoding( const CFSpec *theSpec, long newCoding );

Set a file's color coding.

    	static	ErrCode setColorCoding( const CFSpec *theSpec, long newCoding );

Back to the top of SFiles

### ErrCode getFinderInfo( const CFSpec *theSpec, long *creator, long *type, long *flags, long *attribs );

Get a file's creator, type, flags, and attributes.

    	static	ErrCode getFinderInfo( const CFSpec *theSpec, long *creator, long *type, long *flags, long *attribs );

Back to the top of SFiles

### ErrCode setCreatorAndType( const CFSpec *theSpec, long creator, long type, long flags, long attributes );

Set a file's creator and type.

    	static	ErrCode setCreatorAndType( const CFSpec *theSpec, long creator, long type, long flags, long attributes );

Back to the top of SFiles

### ErrCode setFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );

Set the dates of a file from the given CDateBundle.

    	static	ErrCode setFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );

Back to the top of SFiles

### ErrCode verifyFile( const CFSpec *theSpec );

Verify a file exists.

    	static	ErrCode verifyFile( const CFSpec *theSpec );

Back to the top of SFiles

### ErrCode getFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );

Get the creation, modification, and backup dates of a file into the given CDateBundle.

    	static	ErrCode getFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );

Back to the top of SFiles

### ErrCode setFinderFlags( const CFSpec *theSpec, unsigned short firstAnd, unsigned short thenOr );

Set the finder flags of a file. The current flags will be AND'ed with 'firstAnd', and the OR'ed with 'thenOr'

    	static	ErrCode setFinderFlags( const CFSpec *theSpec, unsigned short firstAnd, unsigned short thenOr );

Back to the top of SFiles

### ErrCode getForkSizes( const CFSpec *theSpec, UnsignedWide *dataLen, UnsignedWide *rsrcLen );

Get the sizes of a files res and data forks.

    	static	ErrCode getForkSizes( const CFSpec *theSpec, UnsignedWide *dataLen, UnsignedWide *rsrcLen );

Back to the top of SFiles

### ErrCode renameFile( const CFSpec *theSpec, const CStr *csNewName, StringPtr outName, long outNameLen );

Rename a file.

    	static	ErrCode renameFile( const CFSpec *theSpec, const CStr *csNewName,
    								StringPtr outName, long outNameLen );

Back to the top of SFiles

### ErrCode updateContainer( const CFSpec *containedSpec );

Set the modification date of the folder containing a file to the current time.

    	static	ErrCode updateContainer( const CFSpec *containedSpec );

Back to the top of SFiles

### ErrCode getRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );

Read the raw resource fork into the given buffer.

    	static	ErrCode getRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );

Back to the top of SFiles

### ErrCode setRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );

Overwrite the resource fork from the given buffer.

    	static	ErrCode setRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );

Back to the top of SFiles

### ErrCode setForkLength( long flags, long whichFork, CFSpec *theSpec, UnsignedWide newLen );

Set the length of the data or resource fork.

    	static	ErrCode setForkLength( long flags, long whichFork, CFSpec *theSpec, UnsignedWide newLen );

Back to the top of SFiles

## All Members

public:
  static ErrCode fullPathNameToSpec( const CStr *csFullPath, CFSpec *theSpecP );
  static ErrCode specToFullPathName( const CFSpec *theSpec, short *len, Handle *hFullPath );
  static ErrCode getContainer( const CFSpec *theSpec, long *contParID, StringPtr contName );
  static ErrCode setColorCoding( const CFSpec *theSpec, long newCoding );
  static ErrCode getFinderInfo( const CFSpec *theSpec, long *creator, long *type, long *flags, long *attribs );
  static ErrCode setCreatorAndType( const CFSpec *theSpec, long creator, long type, long flags, long attributes );
  static ErrCode setFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );
  static ErrCode verifyFile( const CFSpec *theSpec );
  static ErrCode getFileDate( const CFSpec *theSpec, CDateBundle *dateBundle );
  static ErrCode setFinderFlags( const CFSpec *theSpec, unsigned short firstAnd, unsigned short thenOr );
  static ErrCode getForkSizes( const CFSpec *theSpec, UnsignedWide *dataLen, UnsignedWide *rsrcLen );
  static ErrCode renameFile( const CFSpec *theSpec, const CStr *csNewName, StringPtr outName, long outNameLen );
  static ErrCode updateContainer( const CFSpec *containedSpec );
  static ErrCode getRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );
  static ErrCode setRawResourceFork( long flags, CFSpec *theSpec, char *buffer, long bufferLen );
  static ErrCode setForkLength( long flags, long whichFork, CFSpec *theSpec, UnsignedWide newLen );
protected:

Back to the top of SFiles

## Ancestors

Class does not inherit from any other class.

Back to the top of SFiles

## Descendants

Class is not inherited by any others.

Back to the top of SFiles

Generated from source by the Cocoon utilities on Mon May 28 10:11:10 2001 .

Main Page · JConfig · ImageMeister · System Properties Repository · WordMeister · Free Samples · Java Freeware · Contact Us · FAQ · Links

Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.
WarpMovie, TileMovie, JConfig, ImageMeister and MovieShredder are Trademarks of Samizdat Productions.