亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tclmacfcmd.c

?? tcl是工具命令語言
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*  * tclMacFCmd.c -- * * Implements the Macintosh specific portions of the file manipulation * subcommands of the "file" command. * * Copyright (c) 1996-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclMacFCmd.c,v 1.19 2003/02/04 17:06:51 vincentdarley Exp $ */#include "tclInt.h"#include "tclMac.h"#include "tclMacInt.h"#include "tclPort.h"#include <FSpCompat.h>#include <MoreFilesExtras.h>#include <Strings.h>#include <Errors.h>#include <FileCopy.h>#include <DirectoryCopy.h>#include <Script.h>#include <string.h>#include <Finder.h>#include <Aliases.h>/* * Callback for the file attributes code. */static int		GetFileFinderAttributes _ANSI_ARGS_((Tcl_Interp *interp,			    int objIndex, Tcl_Obj *fileName,			    Tcl_Obj **attributePtrPtr));static int		GetFileReadOnly _ANSI_ARGS_((Tcl_Interp *interp,			    int objIndex, Tcl_Obj *fileName,			    Tcl_Obj **readOnlyPtrPtr));static int		SetFileFinderAttributes _ANSI_ARGS_((Tcl_Interp *interp,			    int objIndex, Tcl_Obj *fileName,			    Tcl_Obj *attributePtr));static int		SetFileReadOnly _ANSI_ARGS_((Tcl_Interp *interp,			    int objIndex, Tcl_Obj *fileName,			    Tcl_Obj *readOnlyPtr));/* * These are indeces into the tclpFileAttrsStrings table below. */#define MAC_CREATOR_ATTRIBUTE	0#define MAC_HIDDEN_ATTRIBUTE	1#define MAC_READONLY_ATTRIBUTE	2#define MAC_TYPE_ATTRIBUTE	3/* * Global variables for the file attributes code. */CONST char *tclpFileAttrStrings[] = {"-creator", "-hidden", "-readonly",	"-type", (char *) NULL};CONST TclFileAttrProcs tclpFileAttrProcs[] = {	{GetFileFinderAttributes, SetFileFinderAttributes},	{GetFileFinderAttributes, SetFileFinderAttributes},	{GetFileReadOnly, SetFileReadOnly},	{GetFileFinderAttributes, SetFileFinderAttributes}};/* * File specific static data */static long startSeed = 248923489;/* * Prototypes for procedure only used in this file */static pascal Boolean 	CopyErrHandler _ANSI_ARGS_((OSErr error, 			    short failedOperation,			    short srcVRefNum, long srcDirID,			    ConstStr255Param srcName, short dstVRefNum,			    long dstDirID,ConstStr255Param dstName));static int		DoCopyDirectory _ANSI_ARGS_((CONST char *src,			    CONST char *dst, Tcl_DString *errorPtr));static int		DoCopyFile _ANSI_ARGS_((CONST char *src, 			    CONST char *dst));static int		DoCreateDirectory _ANSI_ARGS_((CONST char *path));static int		DoRemoveDirectory _ANSI_ARGS_((CONST char *path, 			    int recursive, Tcl_DString *errorPtr));static int		DoRenameFile _ANSI_ARGS_((CONST char *src,			    CONST char *dst));OSErr			FSpGetFLockCompat _ANSI_ARGS_((const FSSpec *specPtr, 			    Boolean *lockedPtr));static OSErr		GetFileSpecs _ANSI_ARGS_((CONST char *path, 			    FSSpec *pathSpecPtr, FSSpec *dirSpecPtr,				    Boolean *pathExistsPtr, 			    Boolean *pathIsDirectoryPtr));static OSErr		MoveRename _ANSI_ARGS_((const FSSpec *srcSpecPtr, 			    const FSSpec *dstSpecPtr, StringPtr copyName));static int		Pstrequal _ANSI_ARGS_((ConstStr255Param stringA, 			    ConstStr255Param stringB));                 /* *--------------------------------------------------------------------------- * * TclpObjRenameFile, DoRenameFile -- * *      Changes the name of an existing file or directory, from src to dst. *	If src and dst refer to the same file or directory, does nothing *	and returns success.  Otherwise if dst already exists, it will be *	deleted and replaced by src subject to the following conditions: *	    If src is a directory, dst may be an empty directory. *	    If src is a file, dst may be a file. *	In any other situation where dst already exists, the rename will *	fail.   * * Results: *	If the directory was successfully created, returns TCL_OK. *	Otherwise the return value is TCL_ERROR and errno is set to *	indicate the error.  Some possible values for errno are: * *	EACCES:     src or dst parent directory can't be read and/or written. *	EEXIST:	    dst is a non-empty directory. *	EINVAL:	    src is a root directory or dst is a subdirectory of src. *	EISDIR:	    dst is a directory, but src is not. *	ENOENT:	    src doesn't exist.  src or dst is "". *	ENOTDIR:    src is a directory, but dst is not.   *	EXDEV:	    src and dst are on different filesystems. *	 * Side effects: *	The implementation of rename may allow cross-filesystem renames, *	but the caller should be prepared to emulate it with copy and *	delete if errno is EXDEV. * *--------------------------------------------------------------------------- */int TclpObjRenameFile(srcPathPtr, destPathPtr)    Tcl_Obj *srcPathPtr;    Tcl_Obj *destPathPtr;{    return DoRenameFile(Tcl_FSGetNativePath(srcPathPtr),			Tcl_FSGetNativePath(destPathPtr));}static intDoRenameFile(    CONST char *src,		/* Pathname of file or dir to be renamed				 * (native). */    CONST char *dst)		/* New pathname of file or directory				 * (native). */{    FSSpec srcFileSpec, dstFileSpec, dstDirSpec;    OSErr err;     long srcID, dummy;    Boolean srcIsDirectory, dstIsDirectory, dstExists, dstLocked;    err = FSpLLocationFromPath(strlen(src), src, &srcFileSpec);    if (err == noErr) {	FSpGetDirectoryID(&srcFileSpec, &srcID, &srcIsDirectory);    }    if (err == noErr) {        err = GetFileSpecs(dst, &dstFileSpec, &dstDirSpec, &dstExists,         	&dstIsDirectory);    }    if (err == noErr) {	if (dstExists == 0) {            err = MoveRename(&srcFileSpec, &dstDirSpec, dstFileSpec.name);            goto end;        }        err = FSpGetFLockCompat(&dstFileSpec, &dstLocked);        if (dstLocked) {            FSpRstFLockCompat(&dstFileSpec);        }    }    if (err == noErr) {        if (srcIsDirectory) {	    if (dstIsDirectory) {		/*		 * The following call will remove an empty directory.  If it		 * fails, it's because it wasn't empty.		 */		                 if (DoRemoveDirectory(dst, 0, NULL) != TCL_OK) {                    return TCL_ERROR;                }                                /*		 * Now that that empty directory is gone, we can try		 * renaming src.  If that fails, we'll put this empty		 * directory back, for completeness.		 */		err = MoveRename(&srcFileSpec, &dstDirSpec, dstFileSpec.name);                if (err != noErr) {		    FSpDirCreateCompat(&dstFileSpec, smSystemScript, &dummy);		    if (dstLocked) {		        FSpSetFLockCompat(&dstFileSpec);		    }		}	    } else {	        errno = ENOTDIR;	        return TCL_ERROR;	    }	} else {   	    if (dstIsDirectory) {		errno = EISDIR;		return TCL_ERROR;	    } else {                                		/*		 * Overwrite existing file by:		 * 		 * 1. Rename existing file to temp name.		 * 2. Rename old file to new name.		 * 3. If success, delete temp file.  If failure,		 *    put temp file back to old name.		 */	        Str31 tmpName;	        FSSpec tmpFileSpec;	        err = GenerateUniqueName(dstFileSpec.vRefNum, &startSeed,	        	dstFileSpec.parID, dstFileSpec.parID, tmpName);	        if (err == noErr) {	            err = FSpRenameCompat(&dstFileSpec, tmpName);	        }	        if (err == noErr) {	            err = FSMakeFSSpecCompat(dstFileSpec.vRefNum,	            	    dstFileSpec.parID, tmpName, &tmpFileSpec);	        }	        if (err == noErr) {	            err = MoveRename(&srcFileSpec, &dstDirSpec, 	            	    dstFileSpec.name);	        }	        if (err == noErr) {		    FSpDeleteCompat(&tmpFileSpec);		} else {		    FSpDeleteCompat(&dstFileSpec);		    FSpRenameCompat(&tmpFileSpec, dstFileSpec.name);	            if (dstLocked) {	            	FSpSetFLockCompat(&dstFileSpec);	            }	        }	    }   	}    }        end:        if (err != noErr) {	errno = TclMacOSErrorToPosixError(err);	return TCL_ERROR;    }    return TCL_OK;}/* *-------------------------------------------------------------------------- * * MoveRename -- * *	Helper function for TclpRenameFile.  Renames a file or directory *	into the same directory or another directory.  The target name * 	must not already exist in the destination directory. * *	Don't use FSpMoveRenameCompat because it doesn't work with *	directories or with locked files.  * * Results: *	Returns a mac error indicating the cause of the failure. * * Side effects: *	Creates a temp file in the target directory to handle a rename *	between directories. * *-------------------------------------------------------------------------- */  static OSErr		MoveRename(    const FSSpec *srcFileSpecPtr,   /* Source object. */    const FSSpec *dstDirSpecPtr,    /* Destination directory. */    StringPtr copyName)		    /* New name for object in destination     				     * directory. */{    OSErr err;    long srcID, dstID;    Boolean srcIsDir, dstIsDir;    Str31 tmpName;    FSSpec dstFileSpec, srcDirSpec, tmpSrcFileSpec, tmpDstFileSpec;    Boolean locked;        if (srcFileSpecPtr->parID == 1) {        /*         * Trying to rename a volume.         */                  return badMovErr;    }    if (srcFileSpecPtr->vRefNum != dstDirSpecPtr->vRefNum) {	/*	 * Renaming across volumes.	 */	         return diffVolErr;    }    err = FSpGetFLockCompat(srcFileSpecPtr, &locked);    if (locked) {        FSpRstFLockCompat(srcFileSpecPtr);    }    if (err == noErr) {	err = FSpGetDirectoryID(dstDirSpecPtr, &dstID, &dstIsDir);    }    if (err == noErr) {        if (srcFileSpecPtr->parID == dstID) {            /*             * Renaming object within directory.              */                        err = FSpRenameCompat(srcFileSpecPtr, copyName);            goto done;         }        if (Pstrequal(srcFileSpecPtr->name, copyName)) {	    /*	     * Moving object to another directory (under same name). 	     */	 	    err = FSpCatMoveCompat(srcFileSpecPtr, dstDirSpecPtr);	    goto done;         }         err = FSpGetDirectoryID(srcFileSpecPtr, &srcID, &srcIsDir);    }     if (err == noErr) {        /*         * Fullblown: rename source object to temp name, move temp to         * dest directory, and rename temp to target.         */                  err = GenerateUniqueName(srcFileSpecPtr->vRefNum, &startSeed,       		srcFileSpecPtr->parID, dstID, tmpName);        FSMakeFSSpecCompat(srcFileSpecPtr->vRefNum, srcFileSpecPtr->parID,         	tmpName, &tmpSrcFileSpec);        FSMakeFSSpecCompat(dstDirSpecPtr->vRefNum, dstID, tmpName,         	&tmpDstFileSpec);    }    if (err == noErr) {        err = FSpRenameCompat(srcFileSpecPtr, tmpName);    }    if (err == noErr) {        err = FSpCatMoveCompat(&tmpSrcFileSpec, dstDirSpecPtr);        if (err == noErr) {            err = FSpRenameCompat(&tmpDstFileSpec, copyName);            if (err == noErr) {                goto done;            }            FSMakeFSSpecCompat(srcFileSpecPtr->vRefNum, srcFileSpecPtr->parID,             	    NULL, &srcDirSpec);            FSpCatMoveCompat(&tmpDstFileSpec, &srcDirSpec);        }                         FSpRenameCompat(&tmpSrcFileSpec, srcFileSpecPtr->name);    }        done:    if (locked != false) {    	if (err == noErr) {	    FSMakeFSSpecCompat(dstDirSpecPtr->vRefNum, 	    	    dstID, copyName, &dstFileSpec);            FSpSetFLockCompat(&dstFileSpec);        } else {            FSpSetFLockCompat(srcFileSpecPtr);        }    }    return err;}     /* *--------------------------------------------------------------------------- * * TclpObjCopyFile, DoCopyFile -- * *      Copy a single file (not a directory).  If dst already exists and *	is not a directory, it is removed. * * Results: *	If the file was successfully copied, returns TCL_OK.  Otherwise *	the return value is TCL_ERROR and errno is set to indicate the *	error.  Some possible values for errno are: * *	EACCES:     src or dst parent directory can't be read and/or written. *	EISDIR:	    src or dst is a directory. *	ENOENT:	    src doesn't exist.  src or dst is "". * * Side effects: *      This procedure will also copy symbolic links, block, and *      character devices, and fifos.  For symbolic links, the links  *      themselves will be copied and not what they point to.  For the *	other special file types, the directory entry will be copied and *	not the contents of the device that it refers to. * *--------------------------------------------------------------------------- */ int TclpObjCopyFile(srcPathPtr, destPathPtr)    Tcl_Obj *srcPathPtr;    Tcl_Obj *destPathPtr;{    return DoCopyFile(Tcl_FSGetNativePath(srcPathPtr),		      Tcl_FSGetNativePath(destPathPtr));}static intDoCopyFile(    CONST char *src,		/* Pathname of file to be copied (native). */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级中文字| 色偷偷成人一区二区三区91 | 中文字幕在线不卡| 99re成人精品视频| 亚洲一二三区视频在线观看| 色欧美片视频在线观看| 亚洲国产日日夜夜| 日韩欧美国产1| 国产91露脸合集magnet| 综合精品久久久| 欧美日本一区二区| 经典三级在线一区| ...xxx性欧美| 欧美区视频在线观看| 老鸭窝一区二区久久精品| 中文字幕乱码亚洲精品一区| 欧美主播一区二区三区美女| 奇米色一区二区| 国产精品视频免费看| 在线观看成人小视频| 久久精品久久99精品久久| 国产精品乱码一区二区三区软件| 色哟哟一区二区三区| 日本中文在线一区| 国产精品福利电影一区二区三区四区| 久久亚洲一级片| 99久久夜色精品国产网站| 亚洲sss视频在线视频| 久久免费的精品国产v∧| 一本一道久久a久久精品| 日韩中文字幕亚洲一区二区va在线 | 免费欧美在线视频| 国产精品久久久久影院老司| 欧美日韩情趣电影| 大白屁股一区二区视频| 爽爽淫人综合网网站| 国产欧美日韩卡一| 4438成人网| 色综合天天在线| 国产专区欧美精品| 亚洲一卡二卡三卡四卡无卡久久| 久久久久久影视| 欧美日韩美女一区二区| 成人污污视频在线观看| 日本午夜精品视频在线观看| 亚洲欧洲av在线| 精品99一区二区三区| 欧美日韩亚洲国产综合| 99久久久国产精品免费蜜臀| 久久国产福利国产秒拍| 五月综合激情网| 亚洲欧美一区二区三区极速播放| 久久久久久久久久久电影| 欧美精品亚洲二区| 日本高清成人免费播放| 成人性生交大片免费看在线播放| 久久99热狠狠色一区二区| 亚洲资源中文字幕| 亚洲色图欧洲色图婷婷| 国产网站一区二区三区| 精品久久一区二区三区| 欧美高清激情brazzers| 欧美日韩免费在线视频| 在线观看日韩国产| 色综合久久88色综合天天免费| 成人av在线网站| 成人福利视频在线看| 国产成人免费视频一区| 国产91丝袜在线播放0| 国产一区二区视频在线播放| 美女诱惑一区二区| 久久99国产精品久久99| 蜜臀久久久99精品久久久久久| 香蕉加勒比综合久久| 亚洲亚洲精品在线观看| 亚洲一级二级在线| 亚洲第一会所有码转帖| 亚洲h在线观看| 日本女优在线视频一区二区| 日韩精品一级中文字幕精品视频免费观看| 亚洲一区二区影院| 性欧美大战久久久久久久久| 视频一区在线播放| 奇米色一区二区三区四区| 青娱乐精品在线视频| 激情综合色播激情啊| 国产美女在线观看一区| 粉嫩绯色av一区二区在线观看 | 精品国精品国产尤物美女| 欧美日韩国产高清一区二区三区| 欧美高清视频在线高清观看mv色露露十八| 欧美日产在线观看| 欧美一区二区私人影院日本| 日韩一级大片在线观看| 国产日韩综合av| 亚洲女同一区二区| 亚洲一区二区三区自拍| 日韩不卡一区二区三区| 蜜臀va亚洲va欧美va天堂| 国产精品一区三区| 99视频精品全部免费在线| 欧美在线小视频| 日韩一二三四区| 亚洲国产精品v| 午夜免费久久看| 国产丶欧美丶日本不卡视频| 一本到高清视频免费精品| 欧美精品一卡两卡| 中文字幕不卡的av| 日韩精品久久久久久| 国产成人精品一区二| 在线观看日韩电影| 久久久久久久久久久黄色| 亚洲婷婷在线视频| 精品一区二区影视| 色诱亚洲精品久久久久久| 欧美一级二级三级乱码| 国产精品久久久久久久午夜片| 亚洲成人资源网| 成人一级黄色片| 欧美精品第一页| 国产精品女主播av| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲视频一二三区| 免费欧美高清视频| 91蜜桃在线观看| 久久综合久久久久88| 亚洲一区成人在线| caoporm超碰国产精品| 欧美一区二区三区在线看 | 亚洲永久免费av| 国产99精品视频| 日韩欧美在线一区二区三区| 亚洲欧美日韩中文播放| 国产精品一区二区在线看| 欧美日韩激情一区二区| 亚洲欧洲日韩av| 国产成人午夜高潮毛片| 欧美一区二区三级| 亚洲第一久久影院| 色爱区综合激月婷婷| 国产色产综合产在线视频| 久久精品国产999大香线蕉| 欧美影院一区二区三区| 国产精品久久99| 国产高清精品在线| 精品成人a区在线观看| 日韩av成人高清| 欧美日韩精品一区二区三区| 综合精品久久久| 99v久久综合狠狠综合久久| 2020国产精品自拍| 免费人成在线不卡| 7777精品伊人久久久大香线蕉完整版| 亚洲色图.com| 99国产精品久久久久久久久久久| 国产日韩欧美电影| 国产成人精品亚洲日本在线桃色| 精品国产91亚洲一区二区三区婷婷 | 欧美日韩国产影片| 亚洲国产毛片aaaaa无费看| 91蝌蚪porny| 亚洲精品一二三| 亚洲欧美综合在线精品| 成人国产精品免费观看动漫| 国产视频一区二区在线观看| 国产成人在线视频网站| 日本一区二区免费在线| 成人性色生活片| 亚洲日本成人在线观看| 色综合久久66| 亚洲va欧美va国产va天堂影院| 8v天堂国产在线一区二区| 亚洲第一av色| 欧美一区二区三区影视| 日本va欧美va欧美va精品| 日韩欧美一区中文| 精品在线一区二区三区| 久久精品亚洲乱码伦伦中文| 成人毛片视频在线观看| 亚洲三级久久久| 精品视频免费看| 久久国产精品72免费观看| 国产日韩av一区二区| 91在线国产福利| 婷婷开心激情综合| xnxx国产精品| www.成人在线| 亚洲超碰97人人做人人爱| 日韩精品一区国产麻豆| 成人午夜在线视频| 亚洲一二三专区| 精品久久免费看| 97精品国产97久久久久久久久久久久 | 在线视频欧美精品| 久久国产人妖系列| 亚洲视频精选在线| 日韩一级二级三级精品视频| 床上的激情91.| 日韩精品三区四区|