Inheritance: NSObject
Example #1
0
        public virtual bool ReadFromURL(NSURL url, NSString typeName, ref NSError outError)
        {
            if (url.isFileURL())
            {
                NSString fileName = url.Path;

                if (Objc.Overridden(this.GetType(), "ReadFromFile"))
                {
                    outError = null;
                    return this.ReadFromFile(fileName, typeName);
                }
                else
                {
                    NSFileWrapper wrapper = (NSFileWrapper)NSFileWrapper.Alloc().InitWithPath(fileName);
                    return this.ReadFromFileWrapper(wrapper, typeName, ref outError);
                }
            }
            else
            {
                //FIXME
                //return this.ReadFromData(url.ResourceDataUsingCache(true), typeName, ref outError);
                return false;
            }
        }
Example #2
0
        public virtual void SetFileURL(NSURL url)
        {
            _file_url = url;

            _file_name = (url != null && url.IsFileURL ? url.Path : null);
            this.SetLastComponentOfFileName(_file_url.Path.LastPathComponent());
        }
Example #3
0
 public virtual bool ReadFromURL(NSURL url, NSString typeName, object unused = null)
 {
     NSError err = null;
     return this.ReadFromURL(url, typeName, ref err);
 }
Example #4
0
        public virtual id InitWithContentsOfURL(NSURL url, NSString type, ref NSError error)
        {
            id self = null;

            self = this.InitForURL(url, url, type, ref error);
            //this.SetFileModificationDate(NSDate.Date);

             return self;
        }
Example #5
0
 public virtual id InitForURL(NSURL absoluteURL, NSURL absoluteDocumentContentsURL, NSString typeName, object dummyNullable)
 {
     NSError outError = null;
     return this.InitForURL(absoluteURL, absoluteDocumentContentsURL, typeName, ref outError);
 }
Example #6
0
        //-(id)initForURL:(NSURL *)absoluteDocumentURL withContentsOfURL:(NSURL *)absoluteDocumentContentsURL ofType:(NSString *)typeName error:(NSError **)outError
        //-[IBCocoaDocument initForURL:withContentsOfURL:ofType:error:]
        public virtual id InitForURL(NSURL forUrl, NSURL url, NSString type, ref NSError error)
        {
            id self = this.InitWithType(type, ref error);
            if (self != null)
            {
                this.SetFileType(type);
                if (forUrl != null)
                    this.SetFileURL(forUrl);
                if (this.ReadFromURL(url, type, ref error))
                {
                    if (!url.IsEqual(forUrl))
                    {
                        //
                    }
                }
            }

            return self;
        }
 public virtual id InitWithURL(NSURL url, NSFileWrapperReadingOptions options, ref NSError outError)
 {
     return this;
 }