nsdocumentdirectory Questions
7
Solved
I'm using this piece of code to try to retrieve the last modified date of a file:
NSError *error = nil;
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath: myFilePat...
Petterson asked 21/11, 2012 at 16:19
3
Solved
I am trying to download image files and store in NSDocumentDirectory. In order to do so, I has to turn off data backup on iCloud and iTunes. Below are my codes:
+(void)saveData:(NSData*)thedata:(N...
Scaly asked 17/10, 2012 at 6:37
9
Solved
I'm having some trouble with converting Objective-C code to create a directory for Swift.
Objective-C:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,...
Diocese asked 14/11, 2014 at 13:42
5
Solved
I am making an audio app, and the user can download files locally stored to the documentDirectory using FileManager.
Next, I'd like to allow the user to delete all files using a button. In the doc...
Bondman asked 25/4, 2018 at 4:26
4
Solved
I download the video file from url and save it in document directory with this path:
let destination: DownloadRequest.DownloadFileDestination = { _, _ in
let pathComponent = "pack\(self.packID)...
Masked asked 18/12, 2017 at 7:54
7
Solved
I've found this way of creating a directory if it does not exist. But it looks a bit wonky and I am afraid that this can go wrong in 1 of 1000 attempts.
if(![[NSFileManager defaultManager] fileExi...
Plasty asked 25/5, 2011 at 14:13
10
Solved
I'm trying to get path to Documents folder with code:
var documentsPath = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory:0,NSSearchPathDomainMask:0,true)
but Xcode gives error: Cannot...
Unity asked 5/6, 2014 at 8:23
9
Solved
I have created a Temp directory to store some files:
//MARK: -create save delete from directory
func createTempDirectoryToStoreFile(){
var error: NSError?
let paths = NSSearchPathForDirectoriesI...
Juliojulis asked 29/9, 2015 at 9:13
8
In my app I am storing an image in local storage and I am saving the path of that image in my database. How can I load the image from that path?
Here is the code I am using in order to save the ima...
Biocatalyst asked 1/6, 2016 at 16:57
7
Solved
I am trying to save data to a plist file in swift, but the data isn't showing up as it was saved when the plist is read. This is the code I was using.
var documentsDirectory = NSSearchPathForDirec...
Cordellcorder asked 2/8, 2014 at 23:24
9
Solved
Can someone explain to me what the documents directory is on an iOS app and when to use it?
Here is what I believe at present:
To me, it seems to be a central folder where the user can store any ...
Steatopygia asked 2/8, 2011 at 4:49
3
Solved
I have created a folder inside documents directory using :
fileManager.createDirectory(atPath:ziPFolderPath,withIntermediateDirectories: false, attributes: nil)
In this folder I have placed fe...
Defeasible asked 19/5, 2017 at 10:28
10
Solved
I want to delete an image from my app document directory. Code I have written to delete image is:
-(void)removeImage:(NSString *)fileName
{
fileManager = [NSFileManager defaultManager];
paths ...
Ungula asked 22/2, 2013 at 6:5
3
Solved
I am saving files in a document directory in swift 3 with this code:
fileManager = FileManager.default
// let documentDirectory = fileManager?.urls(for: .documentDirectory, in: .userDomainMask).fi...
Asquith asked 20/6, 2017 at 7:11
4
Solved
I am trying to save data in the documents folder on iPhone 5.1 simulator.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDire...
Classmate asked 15/6, 2012 at 15:33
4
My app using GCDWebServer I get a photo from my iPhone album by using AssetsLibrary and I store them in NSDocumentDirectory. I just want to get access Url to this photo to show them in a web page. ...
Neff asked 3/2, 2015 at 16:23
2
Solved
How can I read a .txt file inside documents directory? Can you show me code?
Ammoniate asked 1/7, 2011 at 10:9
5
Solved
I have seen this code in other post, for save pictures:
// Create path.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *filePath = [[...
Haematite asked 19/6, 2014 at 7:50
1
Solved
I want to save a mp4 video in my folder but when I open again the app, this file is nil. But when I save the file, I can open it, so it seems that it disappears from the folder.
Save:
NSData *vi...
Name asked 16/7, 2015 at 10:49
2
Solved
I'm storing some files in the Library directory in an iOS app, using the following methods to construct it. In the end, I can call [MyClass dataDirectory] to do my file handling and all is well. I'...
Pig asked 30/11, 2014 at 17:42
2
Solved
Every time security of Apps comes up, it turns out a lot of people are unaware of this being an issue. For instance, iOS takes screen-shot of visible screen every time our App gets backgrounded and...
Puissant asked 3/12, 2014 at 7:28
4
Solved
I'm using NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) to get the application documents directory in my app, but the array that's returned contains only one objec...
Chukar asked 29/6, 2011 at 5:6
2
I have an app where I have a certain amount of .jpg pictures (roughly 300). They serve as something to start with, because they're actually located in the internet, but obviously it's more convenie...
Polyanthus asked 27/2, 2013 at 18:30
2
Solved
I created an sqlite file[or any file] in documents directory in ios device.If i removed the app (delete) from the device this file stays or get removed?
Veradis asked 4/6, 2013 at 7:25
4
Solved
I have created some directories in NSDocumentDirectory as
if (![tbxCreateFolder.text isEqualToString:@""]) {
NSArray *arrPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDom...
Cullen asked 18/2, 2013 at 7:16
1 Next >
© 2022 - 2025 — McMap. All rights reserved.