정리

'저장소/잡다한거'에 해당되는 글 32건

  1. Windows 파일 또는 폴더 복사 오류
  2. [XPCOM | C++] nsIContentPolicy - ShouldLoad

Windows 파일 또는 폴더 복사 오류

저장소/잡다한거
출처 : 네이버 지식iN


파일시스템이 FAT를 사용하는지 확인하세요.
FAT인 경우 복사를 못하고 에러가 발생합니다.

파일시스템이 FAT인경우 NTFS로 변경을 해야만 큰 파일을
이동 복사 할수 있습니다.

FAT은 최대 4G까지만 복사 및 이동을 할 수 있습니다.

C와 D드라이브 둘다 NTFS 파일시스템을 가지고  있어야 합니다.

NTFS 변경법은

시작-> 실행-> 'cmd'  (Enter)

도스창에서 'c:\>convert c: /fs:ntfs' (Enter)

그게 끝나면 다시 'c:\>convert d: /fs:ntfs' (Enter)

================================================================================================

FAT32와 NTFS 의 비교
 

NTFS

장점

1.FAT32에서는 가능하지 않은, 일부 디스크 관련 오류를 자동으로 복구할 수 있다.

2.대용량 디스크에 대한 지원이 향상되었다.

3.사용 권한 및 암호화를 사용하여 승인된 사용자만 특정 파일에 액세스할 수 있게 하므로 보안이 향상되었다.

4.디스크 조각 모음을 하지 않아도 된다.

단점

FAT32는 이 NTFS에 접근을 하지 못하므로 Windows 95, Windows 98 또는 Windows ME 등과 같은 FAT32를

사용하는 버전과 다중 부팅을할 수 없다.

 

FAT32

장점

Windows 95, Windows 98 및 Windows ME과 같은 버전의과 다중 부팅을 구성할 수 있다.

단점

1.FAT32에는 NTFS가 제공하는 보안 기능이 없으므로 컴퓨터에 FAT32 파티션 또는 볼륨이 있는 경우 컴퓨터에

  액세스 가능한 모든 사용자가 파일을 읽을 수 있다. 그리고 FAT32에는 크기 제한이 있다.

2.32GB보다 큰 FAT32 파티션을 만들 수 없고 FAT32 파티션에 4GB를 초과하는 파일을 저장할 수 없다.


[XPCOM | C++] nsIContentPolicy - ShouldLoad

저장소/잡다한거
nsIContentPolicy의  ShouldLoad함수는 그냥 그때그때 상황에 맞는 상태만 확인할 수 있음.
navigate 제어나 뭐 그딴건 안됨.
aContentType에 따라서 aContext로 들어오는 DOMNode가 달라짐.
어쨌든 제어 안됨.

*_retval = REJECT_REQUEST or REJECT_SERVER로 return하게되면 현재 동작에 대해 진행이 안됨.
aExtra에 뭔짓을 하면 ShouldLoad()를 벗어나 뭔가 할 수 있다 하는 것 같은데
어이 하는지 모르는 관계로 걍 Observer()를 통해 처리하기로 함.

/************************************************************************/
/* nsIContentPolicy interface                                           */
/************************************************************************/
/**
* Should the resource at this location be loaded?
* ShouldLoad will be called before loading the resource at aContentLocation
* to determine whether to start the load at all.
*
* @param aContentType      the type of content being tested. This will be one
*                          one of the TYPE_* constants.
*
* @param aContentLocation  the location of the content being checked; must
*                          not be null
*
* @param aRequestOrigin    OPTIONAL. the location of the resource that
*                          initiated this load request; can be null if
*                          inapplicable
*
* @param aContext          OPTIONAL. the nsIDOMNode or nsIDOMWindow that
*                          initiated the request, or something that can QI
*                          to one of those; can be null if inapplicable.
*
* @param aMimeTypeGuess    OPTIONAL. a guess for the requested content's
*                          MIME type, based on information available to
*                          the request initiator (e.g., an OBJECT's type
*                          attribute); does not reliably reflect the
*                          actual MIME type of the requested content
*
* @param aExtra            an OPTIONAL argument, pass-through for non-Gecko
*                          callers to pass extra data to callees.
*
* @return ACCEPT or REJECT_*
*
* @note shouldLoad can be called while the DOM and layout of the document
* involved is in an inconsistent state.  This means that implementors of
* this method MUST NOT do any of the following:
* 1)  Modify the DOM in any way (e.g. setting attributes is a no-no).
* 2)  Query any DOM properties that depend on layout (e.g. offset*
*     properties).
* 3)  Query any DOM properties that depend on style (e.g. computed style).
* 4)  Query any DOM properties that depend on the current state of the DOM
*     outside the "context" node (e.g. lengths of node lists).
* 5)  [JavaScript implementations only] Access properties of any sort on any
*     object without using XPCNativeWrapper (either explicitly or
*     implicitly).  Due to various DOM0 things, this leads to item 4.
* If you do any of these things in your shouldLoad implementation, expect
* unpredictable behavior, possibly including crashes, content not showing
* up, content showing up doubled, etc.  If you need to do any of the things
* above, do them off timeout or event.
**/
/* short shouldLoad (in unsigned long aContentType, in nsIURI aContentLocation, in nsIURI aRequestOrigin, in nsISupports aContext, in ACString aMimeTypeGuess, in nsISupports aExtra); */

NS_IMETHODIMP XXXXXXX::ShouldLoad(PRUint32 aContentType,
             nsIURI *aContentLocation,
             nsIURI *aRequestOrigin,
             nsISupports *aContext,
             const nsACString & aMimeTypeGuess,
             nsISupports *aExtra,
             PRInt16 *_retval)