Class NSURL

    • Constructor Detail

      • NSURL

        protected NSURL​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • URLByResolvingAliasFileAtURLOptionsError

        public static NSURL URLByResolvingAliasFileAtURLOptionsError​(@NotNull
                                                                     @NotNull NSURL url,
                                                                     long options,
                                                                     @Nullable
                                                                     @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. API-Since: 8.0
      • URLByResolvingBookmarkDataOptionsRelativeToURLBookmarkDataIsStaleError

        public static NSURL URLByResolvingBookmarkDataOptionsRelativeToURLBookmarkDataIsStaleError​(@NotNull
                                                                                                   @NotNull NSData bookmarkData,
                                                                                                   long options,
                                                                                                   @Nullable
                                                                                                   @Nullable NSURL relativeURL,
                                                                                                   @Nullable
                                                                                                   @Nullable org.moe.natj.general.ptr.BoolPtr isStale,
                                                                                                   @Nullable
                                                                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. API-Since: 4.0
      • URLWithDataRepresentationRelativeToURL

        @NotNull
        public static @NotNull NSURL URLWithDataRepresentationRelativeToURL​(@NotNull
                                                                            @NotNull NSData data,
                                                                            @Nullable
                                                                            @Nullable NSURL baseURL)
        Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. API-Since: 9.0
      • URLWithString

        public static NSURL URLWithString​(@NotNull
                                          @NotNull java.lang.String URLString)
      • URLWithStringRelativeToURL

        public static NSURL URLWithStringRelativeToURL​(@NotNull
                                                       @NotNull java.lang.String URLString,
                                                       @Nullable
                                                       @Nullable NSURL baseURL)
      • absoluteURLWithDataRepresentationRelativeToURL

        @NotNull
        public static @NotNull NSURL absoluteURLWithDataRepresentationRelativeToURL​(@NotNull
                                                                                    @NotNull NSData data,
                                                                                    @Nullable
                                                                                    @Nullable NSURL baseURL)
        Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. API-Since: 9.0
      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static NSURL alloc()
      • allocWithZone

        public static NSURL allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • bookmarkDataWithContentsOfURLError

        @Nullable
        public static @Nullable NSData bookmarkDataWithContentsOfURLError​(@NotNull
                                                                          @NotNull NSURL bookmarkFileURL,
                                                                          @Nullable
                                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. API-Since: 4.0
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • fileURLWithFileSystemRepresentationIsDirectoryRelativeToURL

        @NotNull
        public static @NotNull NSURL fileURLWithFileSystemRepresentationIsDirectoryRelativeToURL​(@NotNull
                                                                                                 @NotNull java.lang.String path,
                                                                                                 boolean isDir,
                                                                                                 @Nullable
                                                                                                 @Nullable NSURL baseURL)
        Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. API-Since: 7.0
      • fileURLWithPath

        @NotNull
        public static @NotNull NSURL fileURLWithPath​(@NotNull
                                                     @NotNull java.lang.String path)
        Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o.
      • fileURLWithPathIsDirectory

        @NotNull
        public static @NotNull NSURL fileURLWithPathIsDirectory​(@NotNull
                                                                @NotNull java.lang.String path,
                                                                boolean isDir)
        API-Since: 2.0
      • fileURLWithPathIsDirectoryRelativeToURL

        @NotNull
        public static @NotNull NSURL fileURLWithPathIsDirectoryRelativeToURL​(@NotNull
                                                                             @NotNull java.lang.String path,
                                                                             boolean isDir,
                                                                             @Nullable
                                                                             @Nullable NSURL baseURL)
        Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. API-Since: 9.0
      • fileURLWithPathRelativeToURL

        @NotNull
        public static @NotNull NSURL fileURLWithPathRelativeToURL​(@NotNull
                                                                  @NotNull java.lang.String path,
                                                                  @Nullable
                                                                  @Nullable NSURL baseURL)
        Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. API-Since: 9.0
      • fileURLWithPathComponents

        @Nullable
        public static @Nullable NSURL fileURLWithPathComponents​(@NotNull
                                                                @NotNull NSArray<java.lang.String> components)
        The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. API-Since: 4.0
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • new_objc

        public static NSURL new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • resourceValuesForKeysFromBookmarkData

        @Nullable
        public static @Nullable NSDictionary<java.lang.String,​?> resourceValuesForKeysFromBookmarkData​(@NotNull
                                                                                                             @NotNull NSArray<java.lang.String> keys,
                                                                                                             @NotNull
                                                                                                             @NotNull NSData bookmarkData)
        Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. API-Since: 4.0
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • writeBookmarkDataToURLOptionsError

        public static boolean writeBookmarkDataToURLOptionsError​(@NotNull
                                                                 @NotNull NSData bookmarkData,
                                                                 @NotNull
                                                                 @NotNull NSURL bookmarkFileURL,
                                                                 long options,
                                                                 @Nullable
                                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. API-Since: 4.0
      • URLByAppendingPathComponent

        @Nullable
        public @Nullable NSURL URLByAppendingPathComponent​(@NotNull
                                                           @NotNull java.lang.String pathComponent)
        API-Since: 4.0
      • URLByAppendingPathComponentIsDirectory

        @Nullable
        public @Nullable NSURL URLByAppendingPathComponentIsDirectory​(@NotNull
                                                                      @NotNull java.lang.String pathComponent,
                                                                      boolean isDirectory)
        API-Since: 5.0
      • URLByAppendingPathExtension

        @Nullable
        public @Nullable NSURL URLByAppendingPathExtension​(@NotNull
                                                           @NotNull java.lang.String pathExtension)
        API-Since: 4.0
      • URLByDeletingLastPathComponent

        @Nullable
        public @Nullable NSURL URLByDeletingLastPathComponent()
        API-Since: 4.0
      • URLByDeletingPathExtension

        @Nullable
        public @Nullable NSURL URLByDeletingPathExtension()
        API-Since: 4.0
      • URLByResolvingSymlinksInPath

        @Nullable
        public @Nullable NSURL URLByResolvingSymlinksInPath()
        API-Since: 4.0
      • URLByStandardizingPath

        @Nullable
        public @Nullable NSURL URLByStandardizingPath()
        API-Since: 4.0
      • absoluteString

        @Nullable
        public @Nullable java.lang.String absoluteString()
      • absoluteURL

        @Nullable
        public @Nullable NSURL absoluteURL()
        if the receiver is itself absolute, this will return self.
      • baseURL

        @Nullable
        public @Nullable NSURL baseURL()
        may be nil.
      • bookmarkDataWithOptionsIncludingResourceValuesForKeysRelativeToURLError

        @Nullable
        public @Nullable NSData bookmarkDataWithOptionsIncludingResourceValuesForKeysRelativeToURLError​(long options,
                                                                                                        @Nullable
                                                                                                        @Nullable NSArray<java.lang.String> keys,
                                                                                                        @Nullable
                                                                                                        @Nullable NSURL relativeURL,
                                                                                                        @Nullable
                                                                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. API-Since: 4.0
      • checkPromisedItemIsReachableAndReturnError

        public boolean checkPromisedItemIsReachableAndReturnError​(@Nullable
                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 8.0
      • checkResourceIsReachableAndReturnError

        public boolean checkResourceIsReachableAndReturnError​(@Nullable
                                                              @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • dataRepresentation

        @NotNull
        public @NotNull NSData dataRepresentation()
        Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. API-Since: 9.0
      • filePathURL

        @Nullable
        public @Nullable NSURL filePathURL()
        Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • fileReferenceURL

        @Nullable
        public @Nullable NSURL fileReferenceURL()
        Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • fileSystemRepresentation

        @NotNull
        public @NotNull java.lang.String fileSystemRepresentation()
        Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. API-Since: 7.0
      • fragment

        @Nullable
        public @Nullable java.lang.String fragment()
      • getFileSystemRepresentationMaxLength

        public boolean getFileSystemRepresentationMaxLength​(@NotNull
                                                            @NotNull org.moe.natj.general.ptr.BytePtr buffer,
                                                            long maxBufferLength)
        Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. API-Since: 7.0
      • getPromisedItemResourceValueForKeyError

        public boolean getPromisedItemResourceValueForKeyError​(@NotNull
                                                               @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> value,
                                                               @NotNull
                                                               @NotNull java.lang.String key,
                                                               @Nullable
                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: - NSMetadataQueryUbiquitousDataScope - NSMetadataQueryUbiquitousDocumentsScope - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: - You are using a URL that you know came directly from one of the above APIs - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. API-Since: 8.0
      • getResourceValueForKeyError

        public boolean getResourceValueForKeyError​(@NotNull
                                                   @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> value,
                                                   @NotNull
                                                   @NotNull java.lang.String key,
                                                   @Nullable
                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • hasDirectoryPath

        public boolean hasDirectoryPath()
        Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. API-Since: 9.0
      • host

        @Nullable
        public @Nullable java.lang.String host()
        If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL.
      • initAbsoluteURLWithDataRepresentationRelativeToURL

        public NSURL initAbsoluteURLWithDataRepresentationRelativeToURL​(@NotNull
                                                                        @NotNull NSData data,
                                                                        @Nullable
                                                                        @Nullable NSURL baseURL)
        Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. API-Since: 9.0
      • initByResolvingBookmarkDataOptionsRelativeToURLBookmarkDataIsStaleError

        public NSURL initByResolvingBookmarkDataOptionsRelativeToURLBookmarkDataIsStaleError​(@NotNull
                                                                                             @NotNull NSData bookmarkData,
                                                                                             long options,
                                                                                             @Nullable
                                                                                             @Nullable NSURL relativeURL,
                                                                                             @Nullable
                                                                                             @Nullable org.moe.natj.general.ptr.BoolPtr isStale,
                                                                                             @Nullable
                                                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. API-Since: 4.0
      • initFileURLWithFileSystemRepresentationIsDirectoryRelativeToURL

        public NSURL initFileURLWithFileSystemRepresentationIsDirectoryRelativeToURL​(@NotNull
                                                                                     @NotNull java.lang.String path,
                                                                                     boolean isDir,
                                                                                     @Nullable
                                                                                     @Nullable NSURL baseURL)
        Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. API-Since: 7.0
      • initFileURLWithPath

        public NSURL initFileURLWithPath​(@NotNull
                                         @NotNull java.lang.String path)
        Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o.
      • initFileURLWithPathIsDirectory

        public NSURL initFileURLWithPathIsDirectory​(@NotNull
                                                    @NotNull java.lang.String path,
                                                    boolean isDir)
        API-Since: 2.0
      • initFileURLWithPathIsDirectoryRelativeToURL

        public NSURL initFileURLWithPathIsDirectoryRelativeToURL​(@NotNull
                                                                 @NotNull java.lang.String path,
                                                                 boolean isDir,
                                                                 @Nullable
                                                                 @Nullable NSURL baseURL)
        Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. API-Since: 9.0
      • initFileURLWithPathRelativeToURL

        public NSURL initFileURLWithPathRelativeToURL​(@NotNull
                                                      @NotNull java.lang.String path,
                                                      @Nullable
                                                      @Nullable NSURL baseURL)
        Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. API-Since: 9.0
      • initWithDataRepresentationRelativeToURL

        public NSURL initWithDataRepresentationRelativeToURL​(@NotNull
                                                             @NotNull NSData data,
                                                             @Nullable
                                                             @Nullable NSURL baseURL)
        Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. API-Since: 9.0
      • initWithSchemeHostPath

        @Deprecated
        public NSURL initWithSchemeHostPath​(@NotNull
                                            @NotNull java.lang.String scheme,
                                            @Nullable
                                            @Nullable java.lang.String host,
                                            @NotNull
                                            @NotNull java.lang.String path)
        Deprecated.
        this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. API-Since: 2.0 Deprecated-Since: 9.0 Deprecated-Message: Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings.
      • initWithString

        public NSURL initWithString​(@NotNull
                                    @NotNull java.lang.String URLString)
        These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil.
      • initWithStringRelativeToURL

        public NSURL initWithStringRelativeToURL​(@NotNull
                                                 @NotNull java.lang.String URLString,
                                                 @Nullable
                                                 @Nullable NSURL baseURL)
      • isFileReferenceURL

        public boolean isFileReferenceURL()
        Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • isFileURL

        public boolean isFileURL()
        Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities.
      • lastPathComponent

        @Nullable
        public @Nullable java.lang.String lastPathComponent()
        API-Since: 4.0
      • parameterString

        @Nullable
        @Deprecated
        public @Nullable java.lang.String parameterString()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 13.0 Deprecated-Message: The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them.
      • password

        @Nullable
        public @Nullable java.lang.String password()
      • path

        @Nullable
        public @Nullable java.lang.String path()
      • pathComponents

        @Nullable
        public @Nullable NSArray<java.lang.String> pathComponents()
        API-Since: 4.0
      • pathExtension

        @Nullable
        public @Nullable java.lang.String pathExtension()
        API-Since: 4.0
      • port

        @Nullable
        public @Nullable NSNumber port()
      • previewItemTitle

        @Nullable
        public @Nullable java.lang.String previewItemTitle()
        Description copied from interface: QLPreviewItem
        The item's title this will be used as apparent item title. The title replaces the default item display name. This property is optional.
        Specified by:
        previewItemTitle in interface QLPreviewItem
      • previewItemURL

        @Nullable
        public @Nullable NSURL previewItemURL()
        Description copied from interface: QLPreviewItem
        The URL of the item to preview. The URL must be a file URL.
        Specified by:
        previewItemURL in interface QLPreviewItem
      • promisedItemResourceValuesForKeysError

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> promisedItemResourceValuesForKeysError​(@NotNull
                                                                                                       @NotNull NSArray<java.lang.String> keys,
                                                                                                       @Nullable
                                                                                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 8.0
      • query

        @Nullable
        public @Nullable java.lang.String query()
      • relativePath

        @Nullable
        public @Nullable java.lang.String relativePath()
        The same as path if baseURL is nil
      • relativeString

        @NotNull
        public @NotNull java.lang.String relativeString()
        The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString
      • removeAllCachedResourceValues

        public void removeAllCachedResourceValues()
        Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. API-Since: 7.0
      • removeCachedResourceValueForKey

        public void removeCachedResourceValueForKey​(@NotNull
                                                    @NotNull java.lang.String key)
        Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. API-Since: 7.0
      • resourceSpecifier

        @Nullable
        public @Nullable java.lang.String resourceSpecifier()
      • resourceValuesForKeysError

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> resourceValuesForKeysError​(@NotNull
                                                                                           @NotNull NSArray<java.lang.String> keys,
                                                                                           @Nullable
                                                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • scheme

        @Nullable
        public @Nullable java.lang.String scheme()
        Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier]
      • setResourceValueForKeyError

        public boolean setResourceValueForKeyError​(@Nullable
                                                   @Nullable java.lang.Object value,
                                                   @NotNull
                                                   @NotNull java.lang.String key,
                                                   @Nullable
                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • setResourceValuesError

        public boolean setResourceValuesError​(@NotNull
                                              @NotNull NSDictionary<java.lang.String,​?> keyedValues,
                                              @Nullable
                                              @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. API-Since: 4.0
      • setTemporaryResourceValueForKey

        public void setTemporaryResourceValueForKey​(@Nullable
                                                    @Nullable java.lang.Object value,
                                                    @NotNull
                                                    @NotNull java.lang.String key)
        Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. API-Since: 7.0
      • standardizedURL

        @Nullable
        public @Nullable NSURL standardizedURL()
      • startAccessingSecurityScopedResource

        public boolean startAccessingSecurityScopedResource()
        Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. Each call to startAccessingSecurityScopedResource that returns YES must be balanced with a call to stopAccessingSecurityScopedResource when access to this resource is no longer needed by the client. Calls to start and stop accessing the resource are reference counted and may be nested, which allows the pair of calls to be logically scoped. API-Since: 8.0
      • stopAccessingSecurityScopedResource

        public void stopAccessingSecurityScopedResource()
        Removes one "accessing" reference to the security scope. When all references are removed, it revokes the access granted to the url by the initial prior successful call to startAccessingSecurityScopedResource. API-Since: 8.0
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • user

        @Nullable
        public @Nullable java.lang.String user()
      • itemProviderVisibilityForRepresentationWithTypeIdentifier_static

        public static long itemProviderVisibilityForRepresentationWithTypeIdentifier_static​(@NotNull
                                                                                            @NotNull java.lang.String typeIdentifier)
      • itemProviderVisibilityForRepresentationWithTypeIdentifier

        public long itemProviderVisibilityForRepresentationWithTypeIdentifier​(@NotNull
                                                                              @NotNull java.lang.String typeIdentifier)
      • objectWithItemProviderDataTypeIdentifierError

        @Nullable
        public static @Nullable NSURL objectWithItemProviderDataTypeIdentifierError​(@NotNull
                                                                                    @NotNull NSData data,
                                                                                    @NotNull
                                                                                    @NotNull java.lang.String typeIdentifier,
                                                                                    @Nullable
                                                                                    @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
      • readableTypeIdentifiersForItemProvider

        @NotNull
        public static @NotNull NSArray<java.lang.String> readableTypeIdentifiersForItemProvider()
      • writableTypeIdentifiersForItemProvider_static

        @NotNull
        public static @NotNull NSArray<java.lang.String> writableTypeIdentifiersForItemProvider_static()
      • writableTypeIdentifiersForItemProvider

        @NotNull
        public @NotNull NSArray<java.lang.String> writableTypeIdentifiersForItemProvider()
      • URLByAppendingPathComponentConformingToType

        @NotNull
        public @NotNull NSURL URLByAppendingPathComponentConformingToType​(@NotNull
                                                                          @NotNull java.lang.String partialName,
                                                                          @NotNull
                                                                          @NotNull UTType contentType)
        \brief Generate a path component based on a partial filename and a file type, then append it to a copy of the receiver. \param partialName The partial filename that should be expanded upon, e.g. \c "readme". \param contentType The type the resulting file should conform to, e.g. \c UTTypePlainText. \result A complete URL. Using the argument examples above, this method would return a URL with a last path component of \c "readme.txt". Use this method when you have partial input from a user or other source and need to produce a complete filename suitable for that input. For example, if you are downloading a file from the Internet and know its MIME type, you can use this method to ensure the correct filename extension is applied to the URL where you save the file. If \a partialName already has a path extension, and that path extension is valid for file system objects of type \a contentType, no additional extension is appended to the path component before constructing the URL. For example, if the inputs are \c "puppy.jpg" and \c UTTypeImage respectively, then the resulting URL will have a last path component of \c "puppy.jpg" . On the other hand, if the inputs are \c "puppy.jpg" and \c UTTypePlainText respectively, the resulting URL will have a last path component of \c "puppy.jpg.txt" . If you want to ensure any existing path extension is replaced, you can use the \c URLByDeletingPathExtension property first. If the path component could not be appended, this method returns a copy of \c self . \note The resulting URL has a directory path if \c contentType conforms to \c UTTypeDirectory . API-Since: 14.0
      • URLByAppendingPathExtensionForType

        @NotNull
        public @NotNull NSURL URLByAppendingPathExtensionForType​(@NotNull
                                                                 @NotNull UTType contentType)
        \brief Generate a path component based on the last path component of the receiver and a file type, then append it to a copy of the receiver. \param contentType The type the resulting file should conform to, e.g. \c UTTypePlainText. \result A complete URL. Using the argument example above and assuming the receiver equals \c "file:///readme" , this method would return \c "file:///readme.txt". Use this method when you have partial input from a user or other source and need to produce a complete filename suitable for that input. For example, if you are downloading a file from the Internet and know its MIME type, you can use this method to ensure the correct filename extension is applied to the URL where you save the file. If the receiver already has a path extension, and that path extension is valid for file system objects of type \a contentType, no additional extension is appended to the path component before constructing the URL. For example, if the receiver's last path component equals \c "puppy.jpg" and \a contentType equals \c UTTypeImage , then the resulting URL will have a last path component of \c "puppy.jpg" . On the other hand, if the inputs are \c "puppy.jpg" and \c UTTypePlainText respectively, the resulting URL will have a last path component of \c "puppy.jpg.txt" . If you want to ensure any existing path extension is replaced, you can use the \c URLByDeletingPathExtension property first. If the extension could not be appended, this method returns a copy of \c self . \note The resulting URL has a directory path if \c contentType conforms to \c UTTypeDirectory . API-Since: 14.0
      • URLWithStringEncodingInvalidCharacters

        public static NSURL URLWithStringEncodingInvalidCharacters​(@NotNull
                                                                   @NotNull java.lang.String URLString,
                                                                   boolean encodingInvalidCharacters)
        Initializes and returns a newly created `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL. If the URL string is still invalid after encoding, `nil` is returned. - Parameter URLString: The URL string. - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise. - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid. API-Since: 17.0
      • initWithStringEncodingInvalidCharacters

        public NSURL initWithStringEncodingInvalidCharacters​(@NotNull
                                                             @NotNull java.lang.String URLString,
                                                             boolean encodingInvalidCharacters)
        Initializes an `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL. If the URL string is still invalid after encoding, `nil` is returned. - Parameter URLString: The URL string. - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise. - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid. API-Since: 17.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.