IsRegularFile() public method

public IsRegularFile ( ) : bool
return bool
Ejemplo n.º 1
0
        public virtual bool ReadFromFileWrapper(NSFileWrapper fileWrapper, NSString typeName, ref NSError outError)
        {
            if (Objc.Overridden(this.GetType(), "LoadFileWrapperRepresentation"))
            {
                outError = null;
                return this.LoadFileWrapperRepresentation(fileWrapper, typeName);
            }

            if (fileWrapper.IsRegularFile())
            {
                return this.ReadFromData(fileWrapper.RegularFileContents(), typeName, ref outError);
            }

            outError = null;
            return false;
        }
Ejemplo n.º 2
0
        public virtual bool LoadFileWrapperRepresentation(NSFileWrapper wrapper, NSString type)
        {
            if (wrapper.IsRegularFile())
            {
                return this.LoadDataRepresentation(wrapper.RegularFileContents(), type);
            }

            /*
             * This even happens on a symlink.  May want to use
             * -stringByResolvingAllSymlinksInPath somewhere, but Apple doesn't.
             */
            NS.Log(@"%@ must be overridden if your document deals with file packages.", "LoadFileWrapperRepresentation");

            return false;
        }